DEV Community

Cover image for Help Needed with JavaScript Code for Automatic Submission on Intel Core vPro Laptop
Tammy Gombez
Tammy Gombez

Posted on

Help Needed with JavaScript Code for Automatic Submission on Intel Core vPro Laptop

I hope you're all doing well. Currently, I'm utilizing an intel core i5 vpro laptop for my programming tasks. I'm currently facing an issue with JavaScript, specifically regarding the automation of form submission based on a "Yes" or "No" field.

Here's the scenario: I have a form where users can select either "Yes" or "No" to indicate their satisfaction. Once they make their selection, the form should automatically submit. The "Yes" or "No" value is included in the URL.

To achieve this one-click satisfaction option, I've attempted to implement the following JavaScript code:

<br> $(document).ready(function() {<br> if (&quot;{INSERTANS:OneClick}&quot; == &quot;Yes&quot;)<br> $(&#39;#movesubmitbtn&#39;).click();<br> });<br>

Unfortunately, this code doesn't seem to work as intended. I've even tried changing the "Yes" value to "Y" but still no luck.

I would greatly appreciate any assistance or suggestions from the community. If you have encountered a similar issue or have expertise in JavaScript, your insights would be invaluable.
If anyone has encountered a similar problem or has suggestions on how to make the automatic form submission work, please share your thoughts in this thread. Your help will be greatly appreciated.

Thank you all in advance for your support and expertise!

Best regards,
Tammy Gombez

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

Top comments (0)

SurveyJS custom survey software

Build Your Own Forms without Manual Coding

SurveyJS UI libraries let you build a JSON-based form management system that integrates with any backend, giving you full control over your data with no user limits. Includes support for custom question types, skip logic, an integrated CSS editor, PDF export, real-time analytics, and more.

Learn more

šŸ‘‹ Kindness is contagious

Please leave a ā¤ļø or a friendly comment on this post if you found it helpful!

Okay