Tagged: Additional Fields, Pre-sale question
This topic contains 8 replies, has 2 voices, and was last updated by Zane M. Kolnik 5 years, 8 months ago.
-
AuthorPosts
-
Hello
I want to add more fields in registration form and a check-box of terms and condition. Can i do this in pro version?
Thanks
PranavHi,
This is possible, but would require additional programming. These two hooks allow you to do this:
function my_field(){ echo '<input name="my_field" type="text" />'; } add_action('zm_ajax_login_register_below_email_field', 'my_field');
function my_field_submit( $user_id ){ // do something with the field // sanitize, save, etc. } add_action('zm_ajax_login_after_successfull_registration', 'my_field_submit', $user_id );
-
This reply was modified 5 years, 8 months ago by
Zane M. Kolnik. Reason: Fixing markup formatting
I want to add a checkbox with some text. can you please send me hook.
i also want to put captcha above the submit button and rearrange the form fields. Please tell me how i can do it.
For the checkbox you could use this:
Add the field
function my_checkbox_field(){ echo '<label for="my_checkbox_id">My label</label>'; echo '<input name="my_checkbox_field" type="checkbox" id="my_checkbox_id" />'; } add_action('zm_ajax_login_register_below_email_field', 'my_checkbox_field');
Do something with the value
function my_checkbox_field_submit( $user_id ){ // do something with the field // sanitize, save, etc. $value = $_POST['my_checkbox_field']; // you'll want to do something with this value } add_action('zm_ajax_login_after_successfull_registration', 'my_checkbox_field_submit' );
I’m not sure how difficult this would be using hooks, but there are a few. The captcha is added using the following hooks;
zm_alr_pro_above_login_button
,zm_alr_pro_above_register_button
. You can see the usage inpro/google-recaptcha/register.php
.Whats the order you would like to put the fields in? I could provide more detail, and possibly a sample.
My Registration form order is
1. username
2. Email
3. Password
4. confirm password
5. Checkbox
6. Captcha
7. Register button
8. Already Register linkCan you please provide me the hook in this order.
My Registration form order is
1. username
2. Email
3. Password
4. confirm password
5. Checkbox
6. Captcha
7. Register button
8. Already Register linkCan you please provide me the hook in this order.
Hi,
In order to do this you’ll want to use the hook
zm_alr_register_form
, which takes one parameter, the $form. Honestly the easiest way is to just copy/past the form from the core file into your action. I’ve gone ahead and created a public gist for you 🙂 which has the form in the order you want.You may want to adjust the CSS as needed.
Let me know if you have any additional questions.
Thanks for the above hook. I have used it. but captcha is still below the Already Register link. i want it on above Register button.
Please check.
http://f67.a1c.myftpupload.com/here i am using pro plugin.
Can you share your code? Just use the “code” button in the editor, or place it between back ticks.
-
This reply was modified 5 years, 8 months ago by
Zane M. Kolnik.
-
This reply was modified 5 years, 8 months ago by
-
AuthorPosts