Forum
Get Join Date and Required fields
Just updated to the newest version of the members app and on the latest version of perch. The additional fields are much appreciated. Two questions related to the update.
1) Is it possible to use perch_member_get() to get the Joined date field that is on the Edit Members form in the admin?
I've tried variants of this
echo''.perch_member_get('perch_memberCreated_year').'';
which is the id of the field in the admin, but those do not work.
2) If a field in the registration form is set to required="false", the field is still marked as required="true" when actually filling out the form, which isn't very helpful on secondary address fields and nicknames and such. What can I do to not have that happen? Template example:
<perch:label for="address">Street address, P.O. Box, etc.</perch:label>
<perch:input type="text" id="address" required="true" label="Street address" />
<perch:error for="address" type="required">Please add your street address</perch:error>
<perch:label for="address2">Apartment, suite, unit, etc.</perch:label>
<perch:input type="text" id="address2" required="false" label="Street address" />
Gary, the "required" attribute is assumed "FALSE" so you would only use it to require="true". I am not sure if there is a check in place for ="false" (which there should be) but just leave the "required" attribute off unless you plan it to actually require it.
EDIT: You would have to use a little PHP to extract the "Y" from the date if this is what you intended in your posted example.
Thanks Robert.