Hi,

This brilliant module does not prepopulate selects´s in D7

I have a field called field_newstype and i try to prepopulate it by calling /node/add/news?edit[field_newstype][value]=test (test is both the value and key)

/Anders

Comments

lewisnyman’s picture

I've been trying to get this to work with a node reference also. It doesn't seem to work for any of the widget types. Select, radios or auto complete.

erle’s picture

Just wanted to mention, that I am using this to populate a select widget on a node_reference without issues. I took the name from the 'name' section of the html...
I used this form "node/add/answers?edit[field_question_nr][und]=value"
where 'field_question_nr' is the fieldname .. I have No Idea where 'und' came in the html output, but with that I could use this in a select.

the html out i took this from is pasted below

<select class="form-select" name="field_question_nr[und]" id="edit-field-question-nr-und"><option value="_none">- None -</option></select>

auto complete did not work, no idea why, don't know if I have the name wrong.. :)

erle’s picture

addition to above: [und] i suspect comes from " und (for undetermined) is used in situations in which a language or languages must be indicated but the language cannot be identified. " .. I suppose I should read up if the above is the recommended way, my site is not a production site..., just a play area

mototribe’s picture

Title: Prepopultion of selects does not work » bug with taxonomy term selects

I'm prepopulating a taxonomy term "multiselect" field using ?edit[field_topics][und]=1 and it works fine.
However, when the user selects another topic or additional topics it will just save the preselected topic only.
It doesn't behave like this with other fields, for example if I prepopulate a title the user can overwrite it and the
correct value gets saved.

I hope this can get fixed, I love the module!

thanks

jbrauer’s picture

Status: Active » Closed (works as designed)

If a field is changed and the pre-populated value is not overwriting any subsequent entry that is a bug according to how the module currently works. #1309934: After prepoulating fields (new) content can not be saved if it was edited before is where that issue is being addressed.