Hi All
I have two additional fields that I have coded in to stripe-checkout-form.php (which is in my theme directory to overwrite the plugins own)
<div class="form-group row">
<label class="col-sm-4 control-label" for="findSelect">How did you hear about us?</label>
<div class="col-sm-8">
<select class="form-control" name="findSelect" id="findSelect" aria-required="true">
<option selected>Choose...</option>
<option>Search Engine</option>
<option>Friend & Family</option>
<option>Facebook Ad</option>
<option>Blog or Website</option>
<option>Other</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-4" for="acceptterms"></label>
<div class="col-sm-8">
<div class="form-check">
<label class="form-check-label">
<input id="acceptterms" name="acceptterms" class="form-check-input" type="checkbox" aria-required="true"> I have read and agree to the <a href="#">Terms and Conditions</a>
</label>
</div>
</div>
</div>
I have also created mu-plugins/s2-store-custom-pro-form-fields.php which contains the following:
add_action('ws_plugin__s2member_during_configure_user_registration', function ($vars = array())
{
$user = $vars['user']; // A WP_user object instance.
$_p = stripslashes_deep($_POST); // $_POST vars via form submission.
if(!empty($_p['findSelect']) && is_string($_p['findSelect']))
update_user_option($user->ID, 'findSelect', esc_html($_p['findSelect']));
if(!empty($_p['acceptterms']) && is_string($_p['acceptterms']))
update_user_option($user->ID, 'acceptterms', esc_html($_p['acceptterms']));
});
And I have taken the above from the examples here: https://s2member.com/kb-article/s2member-pro-forms/#customizing-pro-forms
Unfortunately whatever I set in that drop down field, it doesn’t display in the new users profile.
Any help would be appreciated, thanks.
Adrian