How do I retain the selected value in a dynamic dropdown list?
I have a simple database table with 3 columns:
ID, partner_name and partner_email (address)
I have set up a dynamic drop down list on a form to allow a user to choose a partner, then to pass the corresponding email address to universal email. This works OK.
However, if the form re-loads e.g. due to a validation failing in another field, the selected partner name is lost - it reverts to the initial value - which is the name of the first partner in the list. If this is not noticed the email is sent to the wrong partner.
Is there an example anywhere showing what to do to get the selected drop down choice to be retained on a form re-load?.