Tips and Tricks HQ Support Portal › Forums › WP eMember › Registration Form Field Placement Customization
Tagged: form fields, registration form
- This topic has 10 replies, 3 voices, and was last updated 11 years, 3 months ago by smarttours.
-
AuthorPosts
-
July 25, 2013 at 8:41 pm #9386enyawMember
How can I display the registration form fields in a manner of my choosing?
Example: I have a table with 7 rows and 2 columns. In the second column of the third row, I want to display the first name and last name side by side on a horizontal plane.
In the 2nd column of the 4th row I want to show the email form field.
In the 2nd column of the 5th row, I want to show the username form field.
And so on.
Is there a do_shortcode function I can use to display these fields anywhere I want?
Thanks.
July 26, 2013 at 6:22 am #56808adminKeymasterHi, You can choose what fields you want to show on the registration form but it doesn’t allow you to choose the HTML layout of the form. It is quite hard to offer a system that lets you break the HTML form fields and put it where you want while keeping all the registration features of the membership plugin to be able to process it.
The following documentation explains how to select which fields appear on the registration form:
We do have a filter that lets you override the full registration form so you can override it with custom HTML form code from your own custom code (I am guessing you are a developer since you mentioned the “do_shortcode” function name).
Alternatively, you can tweak the registration code in the eMember plugin and make changes to suit your needs. The registration form code can be found in the “eMember_registration_utils.php” file… look inside the “eMember_reg_form” function and you will see the HTML form with the fields.
July 27, 2013 at 10:17 am #56809enyawMemberThanks for the quick reply. What is the filter that I can use?
July 27, 2013 at 11:56 pm #56810adminKeymasterThe name of the filter is the following:
emember_registration_override
So you can use it like the following (this is a very rough example not the full code):
add_filter('emember_registration_override','my_custom_rego_form');
function my_custom_rego_form()
{
//Create the custom registration form with the required fields
$custom_reg_form .= '<form action="" method="post" name="wp_emember_regoForm" >';
$custom_reg_form ..= wp_nonce_field('emember-plain-registration-nonce');
.....
.....
return $custom_reg_form ;
}A good idea is to copy the content of eMember’s registration form creation function and use it in your custom function. Then tweak the bits you want to change.
July 28, 2013 at 2:49 am #56811enyawMemberCool, I went ahead and customized it in the utils file. It looks awesome. I am going to do a video for your plugin and post it on Youtube and send you guys the links. That way you can send people to that video that I recorded. It is gonna be sweet. Thanks for all of your help. I am looking to do many videos on your plugin. As I will be adding them as coursed to my membership site. I don’t know if I can post links here or not. So let me know and when I have them produced. I will let you know and then post it here.
July 28, 2013 at 11:28 pm #56812adminKeymasterThank you. Yes you can share your link by replying to this post.
July 29, 2013 at 8:03 pm #56813smarttoursMemberI just purchased emember and this is one of the first features I went searching for. I’m not a developer but usually know enough just to get myself into trouble so will await your video. Can’t wait. Thanks
July 30, 2013 at 5:35 pm #56814enyawMemberSure thing smart tours. I love this stuff.
July 30, 2013 at 6:30 pm #56815enyawMemberOkay, smarttours. This is really a raw recording. I just felt inclined to record it for you after I saw your post. I really hope it helps you out.
July 31, 2013 at 1:04 am #56816July 31, 2013 at 2:34 am #56817smarttoursMemberLooks great. Thanks. Gives me somewhere to start. Should be able to figure it out pretty easily from here.
One question for the admin.
If we do these edits what happens when we upgrade the plugin?
-
AuthorPosts
- You must be logged in to reply to this topic.