Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember General Questions › eMember – control over field order
Tagged: update plugin
- This topic has 8 replies, 3 voices, and was last updated 12 years, 3 months ago by mische7.
-
AuthorPosts
-
July 28, 2012 at 1:34 am #7000mische7Member
Hi there. Just for the plugin a couple of days ago and I’m having a lot of trouble tracking down answers to Registration Form tweaks via the forum. I could really use your help.
Here are a few that I need help with.
1. I’d like to control the order in which fields appear on the registration page. How do I do that?
2. The custom field I created for that page continues to show up at the bottom. It’s the most important field and I’d like it to appear at the top. It’s not responding to the display order at all though. (I have its value set to 1) How can I fix this?
3. I’d like to exclude a couple of the fields from displaying. I tried to track down this info here:
https://support.tipsandtricks-hq.com/forums/topic/hiding-registration-fields#post-4783 where the moderator wrote: “Look for the following in the “eMember_misc_functions.php” file and comment out the fields that you don’t want to show: function eMember_reg_form”
I looked and looked and couldn’t find anything regarding that function in the file at all. Can you help?
4. Finally, I need a little css help. I want to change the width of the form labels vs. the input area. (I’d really like the label to be abt 1/3 of the space assigned to the table and the input to be abt 2/3rds. I tried to adjust the css for the “#wp_emember_regoForm table td” but it appears to hit the td tags for the whole tr. What css do I use to address the width of the labels vs the css I use to address the width of the inputs?
Thanks in advance for your help!
July 28, 2012 at 1:45 am #47841mische7MemberActually, I think you can disregard #4 above. I believe I just figured that one out. But the other 3 questions? I’m stumped.
(for anyone that may find this helpful, here’s what I did w/ the css that helped:
.eMember_label, #wp_emember_regoForm table td {
width: 80px !important;
}
July 28, 2012 at 2:17 am #47842PeterMemberRegarding the code which you can’t find:
the “function eMember_reg_form” can be found in the eMember_registration_utils.php file.
July 28, 2012 at 2:33 am #47843PeterMemberRegarding point 2:
” The custom field I created for that page continues to show up at the bottom. It’s the most important field and I’d like it to appear at the top. It’s not responding to the display order at all though. (I have its value set to 1) How can I fix this?”
The custom field Display Order parameter refers to the order in which the “custom” fields are displayed. Note that custom fields will always be displayed after the mandatory registration fields.
You can hack the code in eMember_registration_utils.php file to re-order the custom fields to be displayed BEFORE the other fields by moving the line which looks like the following to be before the first table row position:
include (‘custom_field_template.php’);
(PS: we take no responsibility for anything which may not work as a result of any hacks you perform)
July 30, 2012 at 12:22 am #47844mische7MemberHmm. Still having a little trouble.
I’m not so hot with php so can you tell me exactly what code to replace in order to achieve the following:
1. I’d like to hide the membership level from the form completely and
2. I’d like the Company name field to appear in the spot where membership level now sits.
Thanks a ton.
July 30, 2012 at 6:22 am #47845adminKeymasterWe have added an option in the plugin that will allow you to hide the membership level field from the registration form.
Go to the eMember settings -> Pages/Forms Settings menu then check the following option:
Hide Membership Level Field
If you do not see the above mentioned field then get a new build of eMember:
July 30, 2012 at 8:45 pm #47846mische7Memberokay thanks. I don’t have that option so I just put in an update request.
Can you tell me how to accomplish #2 above as well?
Thanks again –
July 31, 2012 at 1:08 am #47847PeterMemberTo put the custom fields before the mandatory fields you will need to modify the eMember_registration_utils.php file and look for the following line in the function called “eMember_reg_form”:
include (‘custom_field_template.php’);
Move this line to be just before the first table row in html code within the same function.
See the second line in the snippet below and also note how I’ve used the <?php ?> brackets to enclose it:
<table width="95%" border="0" cellpadding="3" cellspacing="3" class="forms">
<?php include ('custom_field_template.php');?>
<tr>
<td><label for="wp_emember_user_name" class="eMember_label"><?php echo EMEMBER_USERNAME;?>: </label></td>
<td><input type="text" id="wp_emember_user_name" name="wp_emember_user_name" size="20" value="<?php echo strip_tags($_POST);?>" class="validate[required,custom[onlyLetterNumberUnderscore],minSize[4]<?php echo $letter_number_underscore?>,ajax[ajaxUserCall]] eMember_text_input" /></td>
</tr>
For next time, just please be aware that this forum is for technical support of all of our plugins and is not really meant to be a place for customization solutions.
August 2, 2012 at 2:58 am #47848mische7MemberThis worked perfectly – thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.