Hi folks...
Since upgrading to 6.8.0, some of my forms have shown some irratic behaviour, so I'd like to get clarity about populating a form from a server action and the use of form reset.
A typical scenario is selecting a contact from a list to be able to see and edit their details.
So I have a list of contacts, and clicking on one loads a server action:
<dmx-serverconnect id="contact" url="dmxConnect/api/Contacts/contact.php" noload="noload">
Then I have a contact form structured like this:
<form id="f_contact" autocomplete="off" method="post"
is="dmx-serverconnect-form"
action="dmxConnect/api/Contacts/update_contact_details.php"
dmx-populate="contact.data.contact">
<input name="first_name" dmx-bind:value="contact.data.contact.first_name">
<input name="last_name" dmx-bind:value="contact.data.contact.last_name">
My question is this:
In order to guarantee that the inputs will show the correct values loaded from the "contact" server action, do I need to perform a form reset on success of the server action?
(I'm also not quite sure what the dmx-populate
part of the form definition plays in this process!)
Thanks,
Antony.