By lordrt21 on
Hello,
I have a dynamic dropdown which is filled from sql query result. I would like for example if I edit the form, and the dropdown already has a value in the mysql table, I want this value to be selected in the dropdown, while also containing the list of values which were filled previously.
How to do this?
Comments
Did you try with the #default
Did you try with the #default_value?
https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.h...
Thanks, indeed it works now,
Thanks, indeed it works now, I had an issue previously with it that's why asked the question here, but for now it's ok, may be a cache problem on my server