Field Regex Potential

8 years 7 months ago #271723 by edmundcheong
Replied by edmundcheong on topic Field Regex Potential

krileon wrote: You don't need to specify Plugin URLs. Just the Plugins parameter as that jQuery plugin is included with CB. I'm not sure I understand the condition though. Name should never be empty. You also need to include the onAfterRegisterFormDisplay trigger if you want it to work on registration in addition to profile edit.


The reason i've put name is not empty so that it will guarantee fire the auto action (as what you said, name can never be empty).

I didn't put it on registration as the field does not appear while registration.

Can it work when it work when the field is conditioned by other fields and a regex to validate the field?

So the setting for the auto action should be like below?

Published: Yes
Title: test input mask
Type: Code
Triggers: onAfterUserProfileEditDisplay
User: Automatic
Access: Everybody
Conditional: [name] NOT EMPTY
Method: jQuery
Code: $( '#cb_fieldnametest' ).inputmask( '9999-9999-9999-9999' );
Plugin URLs:
Plugins: inputmask

Please Log in to join the conversation.

8 years 7 months ago #271733 by krileon
Replied by krileon on topic Field Regex Potential
There's no need for the condition. Yes, that looks correct and should load that jQuery on profile edit. Ensure debug mode and maximum error reporting is enabled during testing. Press F12 to open the developer console when viewing profile edit to ensure there's no JS errors from your usage. Please understand what I've provided is just an example; it was not tested and there is no guarantee it's working.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.163 seconds

Facebook Twitter LinkedIn