MarkMayhrai Posted October 15, 2021 Report Share Posted October 15, 2021 Requesting support please, just need to know how to set a field's value in a submission field to a value when a virtual field's value changes, please Quote Link to comment Share on other sites More sharing options...
CoopperBackpack Posted October 19, 2021 Report Share Posted October 19, 2021 Hello @MarkMayhrai, If I got the inquiry correctly, you have a Virtual field and some data source field on the Submission form. When the value in the Virtual field was changed, the value in the source field should be changed too. If the data source field is set to the usual input field, please test this code. Paste it to the DataPage Footer section. Do not forget to disable the HTML editor on the Advanced tab before pasting the code. Also, please double-check the field names and replace them if needed. <script> document.addEventListener('DataPageReady', function (event) { document.querySelector('input[id*="cbParamVirtual1"]').addEventListener("change", myFunction); function myFunction(event) { let virtualField = event.target.value; document.querySelector('#InsertRecordField_name').value= virtualField; //replace Field_name with your local field name document.removeEventListener('DataPageReady', myFunction); } }); </script> Quote Link to comment Share on other sites More sharing options...
MarkMayhrai Posted August 4 Author Report Share Posted August 4 Hello CopperBackpack, This worked perfectly—thank you so much! I also want to mention that you’ve been incredibly supportive with many of my requests. CoopperBackpack 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.