I have a form that has been working just fine.

There are two fields a Select field with a list of countries and a textfield for Towns for Autocomplete.

I decided to create a collapsible fieldset called ['returndetails'] to put these two fields in.

My problem I have seems to be with the function that returns the updated div after I select a country. If I use

return $form['returndetails']['return_officename'];

The autocomplete does not work and if I use

return $form['return_officename'];

The officename text field is removed.

Can anybody help?

Thanks Simon

  • I think it should be just return $form. Why are you doing return $form['returndetails']['return_officename']; – junedkazi Oct 6 '12 at 19:16
  • I have tried that, but what I find is that the country drop down is duplicated each time I select a new country, so I end up with 2, then 3 then 4 country select fields. If you now how to change this behaviour that might sort out my issue. – PrestonDocks Oct 6 '12 at 21:52
  • can you share the complete form so it is easier to debug. – junedkazi Oct 7 '12 at 0:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.