how to validate email by asking user to enter twice

  • CEO
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 2 months ago #132058 by CEO
Hello again,

Our site is under development (not publicly visible).

Currently our Membership Pro form asks the user to enter their email address.

The user must type their email correctly in order to receive their confirmation message, and to log into the site. We are using the email address as the login name (not a username/handle).

We have set up the email format to be verified (it has "@" and a .com .net, etc. at the end).

We discovered that this verification is not sufficient to prevent a typo. For example, a user could type their email "emali@exampel.com" instead of "email@example.com" and be able to pay for the subscription - but because of the email typos, the new user will not receive the confirmation to activate their subscription.

Question 1: How do I set up a "Retype Email" field that compares the first email to the second email, so that the user is more likely to type in their email correctly? Then, how do I make Membership Pro compare the Email and Retype Email fields?

Question 2: It is possible to subscribe multiple times with the same email address - how can we prevent this?

Question 3: We have several test user accounts that we set up, and wish to delete - how do we delete these unused user accounts?

Your help is appreciated.

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #132060 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic how to validate email by asking user to enter twice
Hello

1=> Just setup the second text field to allow re-type the email. In the validation rules setting, enter validate[equals

Please Log in or Create an account to join the conversation.

  • CEO
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 2 months ago - 4 years 2 months ago #132069 by CEO
Hello Tuan,

Thank you for your reply.

* I created a new field called Retype Email and put "validate[equals]" in the validation rules field of the form.

The Retype Email field does not appear under the Email field on the front end - instead, it appears after the Password/Retype Password fields, even though I have ordered the fields by dragging the Retype Email under the Email field. The password fields are not even visible on the backend - only the front end.

My expected order: Email, Retype Email, Password, Retype Password, etc.

The order on the front end: Email, Password, Retype Password, Retype Email, etc.

Question: How do I put the Retype Email field just below the Email field instead of below the password fields?

* Form Questions:

1. Field Settings Field Type - should this be "Email"?
2. Data Validation Data Type Validation - should this be "Email" or "None"? When I choose Email it changes the Validation rules to "validate[required,custom
Last edit: 4 years 2 months ago by CEO. Reason: the form has duplicated one of the paragraphs and I wanted to remove the duplicate but I do not see it in the post form, only on the page after submission.

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #132070 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic how to validate email by asking user to enter twice
Hello

1. In your case, you are having use email as username, so the email field is displayed above password input. In this case, it's not possible to have the retype email field displayed after email field (because it's just a standard custom field). Code modification will be needed in this case, please submit a support ticket sending us:

- Super admin account
- Link to the page

We will modify code, and configure that retype email field properly for you (to have it works as you want)

2. Your description about the purchase multiple subscriptions using same email looks strange to me. Don't you have User Registration turned on? Users should have an account on your site so that they can renew their subscription later. If you don't turn on user registration integration, the system won't validate the email.

Tuan

Please Log in or Create an account to join the conversation.

  • CEO
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 2 months ago #132132 by CEO
Hi Tuan,

Thank you for this info.

#1 - Our website is under development behind an authentication wall and we cannot grant outside access. Our CTO works in cybersecurity and at present does not grant this type of access.
Please provide instructions on how to customize the Membership Pro form to add the Retype Email field below the Email field, and our CTO will implement this change.
Thanks in advance for your help.

#2 - "User Registration" - I am not familiar with this. Please provide instructions on where to find this setting, so we can check to see if it is set "on."

Your help is appreciated.

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #132149 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic how to validate email by asking user to enter twice
Hello

#1. You will have to customize code in the file components/com_osmembership/view/register/tmpl/default_form.php . If the name of the field is retype_email, then you can use the code from:
Code:
echo $fields['email']->getControlGroup($bootstrapHelper); unset($fields['email']);

To:
Code:
echo $fields['email']->getControlGroup($bootstrapHelper); echo $fields['retype_email']->getControlGroup($bootstrapHelper); unset($fields['email']); unset($fields['retype_email']);


2. For User Registration integration, you can try to go to Membership Pro -> Configuration, set Registration Integration config option to Yes. Also, set Login Box On Subscription Page config option to Yes, too

By doing that, if user has existing account before, they can login before continue subscription process and the system will extend his original subscription instead of making a new subscription

Hope this helps

Tuan

Please Log in or Create an account to join the conversation.

  • CEO
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
4 years 2 months ago #132216 by CEO
Hi Tuan,
I have informed my CTO about the code you suggested.
I will let you know how that works on our site.
Thanks for your assistance. I will probably have a few more questions about this.

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #132219 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic how to validate email by asking user to enter twice
OK. If you have any other questions, please don't hesitate to ask

Tuan

Please Log in or Create an account to join the conversation.