Fields are reset after modal hide

Yi Tang asked on April 7, 2017 00:34

Hi,

There are some fields with values in a form. A modal like private policy can be shown on the top of this form. But when the modal is hidden, all the values are automatically reset. Is there any settings in Kentico which can leave these values not be reset? Thanks!

-Yi

Recent Answers


Amit Srivastava answered on April 7, 2017 07:53

Are you using any JavaScript code or only On-line form web part? If you are using JavaScript code then make return false after modal and if you are not using any JavaScript code then check use update panel checkbox that is in AJAX section in the bottom of web part.

1 votesVote for this answer Mark as a Correct answer

Roman Hutnyk answered on April 7, 2017 08:28

It sounds like you reload the page when close the modal, which sets form to it default state. Try to hide a modal on the client (set display:none etc.) without postback/callback. In case you need postback/callback - make sure view state is enabled for your form.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.