Whenever i make a field for an entity reference and try to put a default value for a certain entity form, it just doesnt save and falls back to "None".

Next question would be; how do i autofill the referenced entity from the current node?

Accepted answer

The README says:

This module enables to use tokens for field default values in simple field types like text or select list. That's a convenient way to pre-populate fields when creating content.

Therefore, it does work as designed. That it doesn't work as you want it to is not a failing of the maintainer.

See also:

 

 

Comments

Whenever i make a field for an entity reference and try to put a default value for a certain entity form, it just doesnt save and falls back to "None".

Can you give more details to reproduce?

I just tried linking to a Node type and setting the default and it worked. I tried with both 'Autocomplete' and 'Autocomplete (Tags style)' widgets.  I created a node and the default was saved. 

Next question would be; how do i autofill the referenced entity from the current node?

Maybe a combination of Corresponding Entity References with the (hopefully) upcoming Entity reference autofill but without a bit more details it is hard to say; it may require some custom code.

To reproduce, 

1-install entityforms and create a simple form.

2-create a content type and add a field with the entity reference.

3-try to save the default value of the reference to your form.

it will revert back to none.

Entity reference autofill was buggy in drupal 7 and wouldnt work anyways, what is needed is the "Entity reference current" module.

Is there some way to convert this module to backdrop cms?

Right. That's a bit more involved; I don't have time to reproduce that at the moment; perhaps someone else will.

I'm sure it will be possible to port the module to Backdrop.  You could put a request here - https://github.com/backdrop-ops/contrib/issues - or have a go and report in the same place that the port is in progress.

This is the error message i get:

 

Notice: Trying to access array offset on value of type null in field_default_token_field_ui_field_edit_form_validate() (line 350 of D:\...\public_html\modules\field_default_token\field_default_token.module).

The problem seems to be related with Field Default Token module.

The coder put alot of comments in field_default_token_form_field_ui_field_edit_form_alter function saying the validation doesnt work with autocomplete, number, list fields and that is pretty much everything.

That module is currently unusable.

The README says:

This module enables to use tokens for field default values in simple field types like text or select list. That's a convenient way to pre-populate fields when creating content.

Therefore, it does work as designed. That it doesn't work as you want it to is not a failing of the maintainer.

See also:

 

 

The maintainer should change the name of the module and not give wrong impressions.

The original drupal module works, i already have sites using it.

Backdrop version doesnt work. If you check the code base, you will see why. It has also been 4 years since last commit which  unfortunately most backdrop modules(that i require) have the same fate.

By the way, im trying to migrate and this is the 4th consecutive year im coming back to backdrop cms to end up disappointed.