Auto-fill a text box based off of text in a different text box - MKB 0096


    In this KB article we're demonstrating how to automatically insert text into a text box, based off of NUMERICAL values typed into a different text box. See the illustration below.





    1. At the bottom of this article is a link to download a .js file. Download the file and open it with any text editor on your computer. Modify the file to replace the values to match what you need.



    2. After you've saved the ValidateText.js file, upload it into your MyOrderDesk File Library.

    3. Start a new Job Form and add the following fields.

    -Add a Script field and name it AutofillHolderScript. Leave the caption blank.
    Copy and paste the following into the field value: 
    <script type="text/javascript" src="ADDPATHTOJSFILEHERE"></script>

    Replace the ADDPATHTOJSFILEHERE with the link to your .js file. You can retrieve this link by navigating to the File Library, and then clicking on the Edit link for the .js file (illustration A). Copy and paste the file's "Link" location (illustration B). Leave the quotation marks when pasting in your link (illustration C). See 3 Illustrations below. 

    Illustration A:


    Illustration B:


    Illustration C:



    4. Add a Text field to the Job Form and name it Value. Use whatever caption you'd like. This is the field that your user will be typing in their data.

    5. Add a QwikPrice Formula field to the Job Form and name it AutofilledText. Type Auto Filled Text into the caption.
    Copy/Paste the following code into the Formula box




    6. You're now ready to test your Job Form. If everything was setup correctly you'll be able to type a value into the Value text box and it will automatically fill Auto Filled Text box with it's corresponding value in the ValidateText.js file. 






    Powered by Zendesk