PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Problems with dynamically populated (via ajax) drop menu on failed validation

  1. groupbrand
    Member

    I have a drop down called 'sub sector' that is dynamically populated based on the selection of another drop down called 'sector'. I have used the jQuery change event handler to make an ajax call and populate the sub sector drop down - this all works fine. The problem is that when I submit the form and validation fails, it clears the sub sector drop down and reverts to its original state. How can I get the form/drop down to remember what its options were before submission so that it retains these (and which option was selected) after a failed validation? N.B. The form is not being submitted using Ajax!

    Posted 12 years ago on Tuesday April 16, 2013 | Permalink