Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-27T16:12:04-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=16393 2011-12-27T16:12:04-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=58959#p58959 <![CDATA[Re: Custom Fields Styling]]>
Thank you for the update and the tip. Glad to hear you got it working! :)

Statistics: Posted by Raam Dev — December 27th, 2011, 4:12 pm


]]>
2011-12-27T08:52:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=58922#p58922 <![CDATA[Re: Custom Fields Styling]]>

I was actually wondering if there was a way to do that. :|

I'll tell you if there's a better way to do this. ;)

Statistics: Posted by Eduan — December 27th, 2011, 8:52 am


]]>
2011-12-27T01:22:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=58884#p58884 <![CDATA[Re: Custom Fields Styling]]>
This line has to be present, I threw it in at the top of the template code.
Code:
<?php $fields = json_decode(S2MEMBER_CURRENT_USER_FIELDS, true); ?>


And to get the checkbox to prefill, it needed the if statement. My custom field is called "accept_terms_checkbox"
Code:
<input <?php if (!(strcmp($fields["accept_terms_checkbox"],1))) {echo "checked=\"checked\"";} ?> name="accept_terms_checkbox" type="checkbox" value="accept_terms_checkbox" />


Maybe not the most correct way, if there is a better way, let me know.

Statistics: Posted by TheresaBug — December 27th, 2011, 1:22 am


]]>
2011-12-27T00:35:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=58882#p58882 <![CDATA[Re: Custom Fields Styling]]>
Adding the fields seems pretty straightforward as well, however getting the checkbox to pre-fill according to the current user's value is confusing me. What exactly do I type in for the value?

If you could please post the code, that would be very helpful.

Statistics: Posted by TheresaBug — December 27th, 2011, 12:35 am


]]>
2011-12-25T22:33:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=58792#p58792 <![CDATA[Re: Custom Fields Styling]]>
Is it possible to modify the PayPal® and/or Authorize.Net® Pro Form templates?

Usually not necessary. But yes, if you really need to. Please check your /s2member-pro/includes/templates/forms/ directory. You can take the default templates, and place some ( or all of them ) into your own WordPress® theme directory. s2Member Pro will automatically find your custom templates there. By placing custom templates into your theme directory, you can be sure they won't get overwritten in a future upgrade. Either that, or you can just use the default templates like they are, and customize them with your own CSS rules inside the Stylesheet for your WordPress® theme ( i.e. style.css ). If you're using a PriMo Theme ( for instance, the s2Clean Theme ), check your Theme Options Panel, under: Custom CSS / Style Sheet.

* Note. It is also possible to use PHP code in your template files. All WordPress/s2Member framework functionality is available via PHP inside the template files.


So, you can simply take the necessary templates from /s2member-pro/includes/templates/forms/ and copy them into your theme directory. Then you can manually add the custom fields that you always want to show up.

To pre-fill the fields with whatever matches the user's profile, you'll need to first check if the user is logged in (WP Admin -> s2Member -> API/Scripting -> s2Member PHP/API Constants -> S2MEMBER_CURRENT_USER_IS_LOGGED_IN).

Then to set the value for each the fields using the information from the user's profile (WP Admin -> s2Member -> API/Scripting -> s2Member PHP/API Constants -> S2MEMBER_CURRENT_USER_FIELDS).

Does that make sense?

Statistics: Posted by Raam Dev — December 25th, 2011, 10:33 pm


]]>
2011-12-21T10:30:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=58400#p58400 <![CDATA[Re: Custom Fields Styling]]>
For some reason, these "Additional Information" fields do not show up on the paypal pro form if you are logged in. There is a note in the template file saying this intentional

"<!-- Custom Fields will NOT be displayed to existing Users/Members that are already logged-in. s2Member assumes this information has already been collected in that case. -->"

This is what I would like to change. I have a checkbox for acceptance of terms and a phonenumber field, and I would like to make both available to logged in members on the paypal pro form page. I want these fields to be pre-filled with the user's information if they have previously entered it.

Perhaps an easier way to accomplish this is adding these custom fields to the template individually. In that case, what would I put so that these fields are pre-filled?

Statistics: Posted by TheresaBug — December 21st, 2011, 10:30 am


]]>
2011-12-20T20:51:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=58332#p58332 <![CDATA[Re: Custom Fields Styling]]>
Did you make sure that when you created the Custom Fields, you set Applicable Membership Levels = all and Allow Profile Edits = Yes ( editable )?

Statistics: Posted by Raam Dev — December 20th, 2011, 8:51 pm


]]>
2011-12-20T16:33:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=58310#p58310 <![CDATA[Re: Custom Fields Styling]]>
Currently, the custom fields section only shows up for users not logged in. How can I make this section visible to users who are logged in?

I would like to control which custom fields show up under the section heading as well.

Any hints?

Statistics: Posted by TheresaBug — December 20th, 2011, 4:33 pm


]]>
2011-12-19T21:17:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=56978#p56978 <![CDATA[Re: Custom Fields Styling]]>
Thanks again!

Statistics: Posted by joadard — December 19th, 2011, 9:17 pm


]]>
2011-12-19T11:42:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=56928#p56928 <![CDATA[Re: Custom Fields Styling]]> Check inside one of these files please:

Code:
/s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php
/s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php

Search for: checkbox|pre_checkbox
Or search for: <br />

Statistics: Posted by Jason Caldwell — December 19th, 2011, 11:42 am


]]>
2011-12-19T05:18:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=56896#p56896 <![CDATA[Re: Custom Fields Styling]]> Statistics: Posted by Cristián Lávaque — December 19th, 2011, 5:18 am


]]>
2011-12-17T09:53:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=56765#p56765 <![CDATA[Re: Custom Fields Styling]]> Statistics: Posted by joadard — December 17th, 2011, 9:53 am


]]>
2011-12-17T05:26:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=56750#p56750 <![CDATA[Re: Custom Fields Styling]]>
Is that an s2Member Pro pro-form or the default wp-login.php one?

Statistics: Posted by Cristián Lávaque — December 17th, 2011, 5:26 am


]]>
2011-12-16T10:44:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=56675#p56675 <![CDATA[Re: Custom Fields Styling]]>
Code:
<br />
tags from the file I mentioned in my previous post - but no cigar.

Statistics: Posted by joadard — December 16th, 2011, 10:44 am


]]>
2011-12-16T10:42:00-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16393&p=56674#p56674 <![CDATA[Custom Fields Styling]]>
I'm trying to locate where the custom fields information is being pulled from - I have a form with custom fields being added and there is a blasted
Code:
<br>
tag in the middle...

Code:
<span>College/University Name *</span>
</label>
<br>
<input


I need to remove it but can't find it anywhere! I've done a search through the files and cannot seem to locate where that might be.

I looked in custom-reg-fields.inc.php - but can't seem to identify how to get this tag to go away!

Thanks in advance :)

Statistics: Posted by joadard — December 16th, 2011, 10:42 am


]]>