Skip to main content

Add a field in signups_edit.html

Hello there!

I want to give the opportunity for users to indicate their age in signups_edit.html

For that I add this field:

<label for="signup_age">Age</label>{% text_field "age", class:"text" %}

But that doesn't work: Liquid error: age is not a valid form field for Signup.

Even if "age" is a variable of Signup.

Ideas?

Official response from

Hi Wilfried!

So, the liquid age variable can only be used to display age, not request age, because age is a variable that would be constantly changing! You can request Date of Birth, however, and the database will automatically determine a signup's age.

If you want to request Date of Birth, you can use this chunk of code:

<div class="span12"><label for="signup_born_at_chronic">Date of Birth (MM/DD/YYYY) </label>{% text_field "born_at_chronic", class:"text" %}</div>

Let us know if you have any more questions!

Share this post

Showing 8 reactions

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