Showing and Hiding Fields Based on DocMart Menu Selections Using SmartForms - MKB 0104

    Follow

    1. In order to show or hide fields based on DocMart Menu selections using SmartForms, start by clicking the edit button of the order form you wish to use and add a DocMart Menu field to the form.

    KBDocMartMenu.jpg

    2. Name your DocMart Menu field and enter a caption for it before choosing which DocMart catalog list you would like to use.

    KBDocMartcataloglist.jpg


    3. Next, you will add a QwikPrice Formula field to your form, also naming it accordingly.

    KBQwikPriceFormulaField.jpg


    4. Copy and paste the following script into the QwikPrice Formula field in the section labeled Formula and then check the Hidden box:

    var MyItem=thisForm.invlist_DocMartMenuFieldName.options[thisForm.invlist_DocMartMenuFieldName.selectedIndex].text;
     if (MyItem == 'A1')
     { 1 }
     else if (MyItem == 'A2')
     { 2 }
     else if (MyItem == 'A3')
     { 3 }
     else
     { 0 }

    KBQPScriptandHidden.jpg


    5. You will insert the name of your DocMart Menu field into the yellow highlighted sections and items from your DocMart Catalog List in the pink highlighted sections.

    KBscriptcolorcoded.jpg


    6. Next, you will click on the SmartForms button.

    KBsmartformsbutton.jpg

    For the section marked Select a Trigger field, choose your QwikPrice Formula field. For the section marked Set the Trigger Value, Action, you will set it to = and then choose the number that corresponds with the DocMart item that, when selected, shows or hides a field. For this example, we are choosing the second DocMart item on our list.

    KBcorrespondingDMitem.jpg


    KBSFequals2.jpg


    7. You will then choose whether or not you want to show or hide a field, and then select which field you would like to show or hide. For this example, when choosing our second DocMart item, the Job Notes field will appear. Click on Add Rule and close SmartForms.

    KBSFshownotes.jpg


    This is how the form appears when we've selected the first DocMart item in the list.

    KBDMitemnotselected.jpg

    And this is how it appears when we've selected the second DocMart item in the list. Notice that the Job Notes field is now shown.

    KBdocmartitem2.jpg

    Comments

    Powered by Zendesk