Jump to content

Verifying initials


squaringkarma

Recommended Posts

Hi again. What's a common way of verifying someone has entered their initials? My thought process was this:

  • Person enters their name in three separate fields on a form: First Name, Middle Initial, and Last Name.
  • [other fields not relating to this question.]
  • Person enters their initials in a field called Initials. If they didn't enter a Middle Initial, I ask them to enter in an * where it would be.
  • I would then take a substring of the First Name, Middle Initial, and Last Name fields and put them into an array. If they didn't enter a Middle Initial, I would somehow put the default value of that substring as an *.
  • I would then use implode to convert the array to a string.
  • Then I would compare the new string to the value of the field Initials.

 

...But I was wondering if there was a simpler/more intuitive way of doing the task. Hopefully my way made sense?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.