Update - Making the form field mandatory

The following instructions are provided to support updates made to the following code features, which is not covered in the supporting instructional video for this feature:

  • Standard Shopify Form Fields
    • Selection menu or pills

Update details -  It is now possible to make the form field(s) mandatory for a customer to complete.

Important - Some web browser's (i.e. Firefox) have been found to ignore the required field attribute when using the pills option. Therefore if you are looking to ensure the form field is mandatory for the customer to complete regardless of the browser being used, the dropdown (selection menu) option is recommended.

 

Instructions

Step 1 - Follow the original instructions provided on YouTube, which can be accessed by copying the feature code to clipboard and then pressing the 'View the setup demonstration' link when selecting the form field to use.

Step 2 - If you would like to make the field mandatory for the customer to complete, carry out the following:

  • Set the new required_field variable value from false to true.
  • Update the required_text variable value (optional - ensure the text is enclosed within speech marks)

Required field update

 

Step 3 - Add the Required fields code snippet (only requires adding once per template)

  • Click the Add block link within the product information section and then select Custom liquid.

Adding a Custom Liquid block in Shopify

  • Left click and drag the new Custom liquid block into position beneath the Buy buttons block.
  • Left click on the Custom liquid block to open the block settings
  • Copy the Required fields feature code to the clipboard.
  • Paste the copied code into the new Custom liquid block in Shopify.

Step 4 - Disable the Buy it Now button (required if any of the form fields used in the product page template are mandatory for the customer to complete)

  • Click the Buy Buttons block

Shopify product page template Buy Buttons block

  • Disable Show dynamic checkout buttons

Step 5 - Save the updates made to the product page template in Shopify.