Jump to content
  • 0

Change in DropDown value - auto resets form?


Oakley

Question

4 answers to this question

Recommended Posts

  • 0

Hi @Oakley,

You can try using this kind of JS code, where it will reset the other fields once the value on the dropdown is selected:

<script type="text/javascript">
document.addEventListener('DataPageReady', function (event) {
//Field for the dropdown
var x = document.querySelector('[name*=InsertRecordTitle]');

//All the other fields that needs to be reset
x.onchange = function() {
document.querySelector('input[name="InsertRecordName"]').value = "";  
document.querySelector('input[name="InsertRecordEmail"]').value = ""; 
document.querySelector('input[name="InsertRecordDATE"]').value = ""; 
document.querySelector('input[name="InsertRecordDescription"]').value = ""; 
 } });
</script>

Refer screenshot below:
image.png.23a369efd89842c53a8bfc4c5172c923.png

You may test it out here: https://c1abv183.caspio.com/dp/48276000abef0cdd18cc4d178a92

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...