Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
- This topic has 11 replies, 3 voices, and was last updated 13 years ago by
Steven Zahm.
-
AuthorPosts
-
07/04/2013 at 12:30 pm #264310
kroussel
GuestIs it possible to force users to fill the form with a specific format? For example, I would like people to have to provide their phone number, address, etc. in a specific and harmonized format.
07/05/2013 at 12:10 pm #264357Steven Zahm
Keymaster@ kroussel
Sorry, no. The reason for the openness is because it would be near impossible to account for all variations.
07/25/2013 at 11:52 am #265787Eric Belanger
ParticipantI’m trying to edit the Form plug-in to force a format. Here is the line of code I would put
<input type='tel' pattern=' [\(]\d{3}[\)]\d{3}[\-]\d{4}' title='Phone Number (Format: (999)999-9999)'>If I put it in the connections_form.php file, will it force a format? I tried it and it didn’t work, so I thought you could give me more insight.
Thanks!
07/25/2013 at 1:20 pm #265793Steven Zahm
Keymaster@ kroussel
I haven’t played w/ patterns yet, here’s a link though that may help.
07/28/2013 at 2:41 pm #265982Eric Belanger
ParticipantI developed a pattern
$out .= '<label>' . __('Phone Number (format (506) 555-5555)' , 'connections_form' ) . '</label> <input type="tel" pattern="[\(]\d{3}[\)]\d{3}[\-]\d{4}" name="phone[::FIELD::][number]" value="" style="width: 30%"/>' . "\n";But I still can add any type of number for the phone number. Where else do I need to edit Connections Form so I can force people to use that specific format?
07/29/2013 at 1:05 pm #266035Steven Zahm
Keymaster@ kroussel
Probably this line:
$out .= '<input type="hidden" name="phone[::FIELD::][visibility]" value="public">';07/30/2013 at 5:25 pm #266130Eric Belanger
ParticipantHow about this one? there is the
$out .= __(‘Phone Type’ , ‘connections_form’ ) . ‘: ‘ . $form->buildSelect(‘phone[::FIELD::][type]’, $connections->options->getDefaultPhoneNumberValues() ) . “\n”;
There is an item called
$connections->options->getDefaultPhoneNumberValues() )
07/30/2013 at 8:06 pm #266144Steven Zahm
Keymaster@ kroussel
No, the line of code in my previous post would be the line you should add your pattern. The
getDefaultPhoneNumberValues()function only returns an array containing the different phone number types such as home and work.08/01/2013 at 2:37 pm #266247Eric Belanger
ParticipantI applied your suggestions but it still allows me to enter any type of number. I want to force users to use a specific format. Any other insight?
08/01/2013 at 4:03 pm #266250Steven Zahm
Keymaster@ kroussel
I have only two thoughts…
Form uses jQuery Validate to do its validation. It is possible that is may be overriding your pattern.
Make sure you are using a browser that support it, otherwise it will not have any effect at all. Browser coverage is still rather weak.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
