Making phone number "required" on an event page returns a validation error

Within the 'Event settings' section of an event type page, there is a "Require phone" checkbox. If "Ask for mobiles" is enabled in 'Site settings,' only the mobile phone field will display. When both of theses options are enabled, the non-ticketed event RSVP form will consistently return the validation error displayed in the image below.

If "Ask for mobiles" is disabled, the standard phone field will display and the validation error will not occur. If "Ask for mobiles" at the site level is enabled after "Require phone" has been enabled at the page level, both Mobile phone and Phone fields will display. This version of the form will also submit as expected.

Workaround: To require the mobile phone field on an event page, change the following code in your page-level template or in the pages_show_event.html and pages_show_event_wide.html theme files:

Change: {% phone_field "mobile_number", class:"text" %}

To: {% phone_field "mobile_number", class:"text", required: "required" %}

Screen_Shot_2017-12-12_at_6.10.13_PM.png

Share this post

Be the first to comment

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