2
Format Validation of Controls in a Widget
Source: elementor/elementor#33866 · opened by @JohnnyHerms
Describe the Problem We're creating an elementor addon which includes a custom widget. Our widget uses Elementor TEXT controls for a phone number, fax number, email address. We also use an Elementor URL control for a website url. I would like to do format validation on these controls and show a warning to the user if it doesn't match the format. For example, the phone number should only allow digits, spaces, hyphens, parentheses and x/X for extension. I can't find any elementor documentation of how to do this. There's only documentation of how to do this for form fields but that doesn't apply to controls Propose a Solution Implement function(s) within Base_Control class (and/or other control classes)of Elementor Core that allows controls to define explicit patterns (regex patterns) of what is an acceptable format. any widget that extends from Widget_Base can then validate its controls against the expected pattern to see if there's a valid format. …
No pledges yet. Be the first to back this.
Comments
Similar requests
Make Loop Grid Gap controls equal to Container controls using a Dimensions field
1 vote · 0 comments
Add ability to use Loop Elements in custom widgets
3 votes · 0 comments
Separate Widget Settings panel from Widget Panel
1 vote · 0 comments
Improve text editing capabilities in the List Icons Widget
2 votes · 0 comments
How to customize WYSIWYG control for custom Elementor widget.
2 votes · 0 comments
No comments yet.