Skip to main content

Setting input type

I'd like to change the email inputs on my form to be HTML email inputs to provide better mobile support.  <input type="email">

If I add a type: "email" option to the liquid tag, I just get an error. {% text_field  "email", class="text", type: "email" %}

1) Is it possible to change the type via an argument here?

2) Are all the options available with this liquid tag documented anywhere?

3) Is there any downside in just using a full <input> tag with all values specified as I'd like them?

Official response from

In NationBuilder's liquid markup, email fields actually have their own syntax (which is subtly different from a normal text field). 

ex: {% email_field "email", class:"text" %}

When the field renders, it will automatically specify type="email", so there's no need to specify it manually.

With regard to manually including your own input tags, doing so will likely cause submission errors with your forms. The best practice is to render your forms using the standard liquid variables as similarly to our public themes as is possible (albeit with your own styles and formatting applied, of course) to ensure that your forms submit without errors. 

If you have specific questions about your liquid, feel free to email [email protected]. We're happy to help, and it is often easier to troubleshoot these questions over email than via a public question.

 

Share this post

Showing 3 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.