Dimitri Posted December 19, 2019 Report Share Posted December 19, 2019 I have a cascading text field which pulls up results from a dropdown. Also I have a button with URL and I need the URL to be updated in accordance with the value selected in a dropdown. Is there any way to achieve this? Quote Link to comment Share on other sites More sharing options...
0 Hastur Posted December 19, 2019 Report Share Posted December 19, 2019 Hello @Dimitri It is possible using additional JS code. First of all, you should use custom link, like this: <a href="" id="customLink">LINK</a> You can insert it into HTML block of the submission form. Then you should add the following code to change the href of your custom link. In the example, I use the Virtual1 field as the source with the link value: <script type="text/javascript"> function changeLink(event) { document.querySelector('#customLink').href = event.target.value; } function changedHandler() { document.querySelector('input[name="cbParamVirtual1"]').addEventListener('change', changeLink); document.removeEventListener('DataPageReady', changedHandler); } document.addEventListener('DataPageReady', changedHandler); </script> Please note that the id of your link should be the same as querySelector() argument in the someAlert() function. Quote Link to comment Share on other sites More sharing options...
Question
Dimitri
I have a cascading text field which pulls up results from a dropdown.
Also I have a button with URL and I need the URL to be updated in accordance with the value selected in a dropdown.
Is there any way to achieve this?
Link to comment
Share on other sites
1 answer to this question
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.