latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Custom fields not behaving as expected

Home Forums Community Forum Custom fields not behaving as expected

This topic contains 3 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 10 months ago.

Topic Author Topic
Posted: Tuesday Feb 28th, 2012 at 10:48 am #6669
Dina
Username: codeshed

I have created 4 custom fields using the backend and have included what I think is the appropriate code in a customized version of the paypal-checkout-form.html file that I have moved into the root of the theme folder, but I am having 2 issues:

1.) The required custom fields do not get handled as required and the user can post the form with out filling them out.
2.) The custom fields do not hold the user inputted values when the form is posted, but returns an error ( eg. invalid email address )…this requires the user to re-enter all of the custom fields.

I notice in some of the default fields the value= is set like this:
value=”%%first_name_value%%”

<input aria-required="true" height="35" type="text" maxlength="100" name="s2member_pro_paypal_checkout[first_name]" id="s2member-pro-paypal-checkout-first-name" class="s2member-pro-paypal-first-name s2member-pro-paypal-checkout-first-name" value="%%first_name_value%%" tabindex="10" />

What is the equivalent for a custom field called company_name

  • This topic was modified 4 years, 10 months ago by  Dina.

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Wednesday Feb 29th, 2012 at 4:44 am #6743

You can’t control the custom fields with the template yet. :/

You’ll notice in the template that there’s a replacement code [hilite mono]%%custom_fields%%[/hilite], which is where the custom fields will be added, but you can’t edit them there.

We’re working on making this possible from the template.

Posted: Wednesday Feb 29th, 2012 at 3:11 pm #6787
Dina
Username: codeshed

Thanks! I removed the %%custom_fields%% and built my own into the template and that works except for the the 2 points above.

The reason I am not using the %%custom_fields%% is that I needed more control the order they output. 4 text boxes go near the top of the form then after username password…etc. I have a accept terms options that is coded into the form using the custom field option.

Any workaround that you can think of?

Posted: Wednesday Feb 29th, 2012 at 4:18 pm #6803

Well, I don’t really know. I know the form validation is done with JavaScript, so you modifying the form would be affecting that.

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.