-2

i tried to use this in url:

site.com/node/add/material/?field_material_category=6

content type 'material' has entity field 'field_material_category'

number '6' is nid of node content type 'material_category'

But this url link doesnt work at all, field is empty....

What i am doing wrong?

1 Answer 1

3

If you want to pre-fill a field value on the add form with the query string, you can use the Prepopulate module.

1
  • 1
    @OnengLar You need to read the docs, which is why your question has a negative score. The module page I linked to has an example with code showing how to use prepopulate with an entity reference field. Dec 7, 2020 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.