One Dynamic Field – Help / Question
-
Hi,
I’m very new to Elementor development, but it seems quite straight forward.
I’m trying to do something very simple:
– Add one Dynamic Field into an existing pluginPlugin:
https://www.ads-software.com/plugins/dynamic-visibility-for-elementor/Link to Extension file Code:
https://plugins.trac.www.ads-software.com/browser/dynamic-visibility-for-elementor/trunk/extensions/DCE_Extension_Visibility.phpBy adding a:
$element->add_control( 'dce_dynamic_visibility_role', [ 'label' => __('Users & Roles', DCE_TEXTDOMAIN), 'type' => Controls_Manager::TEXT, 'dynamic' => array( 'active' => true ), 'description' => __('If you want limit visualization to specific dynamic user role', DCE_TEXTDOMAIN), 'condition' => [ 'enabled_visibility' => 'yes', 'dce_visibility_hidden' => '', 'dce_visibility_everyone' => '', ], ] );
After control named “dce_visibility_role”
(https://plugins.trac.www.ads-software.com/browser/dynamic-visibility-for-elementor/trunk/extensions/DCE_Extension_Visibility.php#L170):
I’m easily able to achieve this:
https://snag.gy/8r1W2U.jpgA new field, and it is custom field and I can select my custom field property. Hurray!
…But it’s no, “hurray” because on row:
https://plugins.trac.www.ads-software.com/browser/dynamic-visibility-for-elementor/trunk/extensions/DCE_Extension_Visibility.php#L684Where I would like to check for the new custom value from the
$settings
variable, just like all the other variables are pulled out, I do:
$settings['dce_dynamic_visibility_role']
But this value is always empty. I have NO clue why I cannot get this data into this variable through custom data field. If I enter just a regular string it works.
I’ve read up on “Dynamic tags” https://developers.elementor.com/dynamic-tags/
But I have difficulties modifying this plugin, since it is not following these instructions correctly. For exampleprotected function _register_controls() {}
Is calledprivate function add_controls($element, $args) {...}
on row:
https://plugins.trac.www.ads-software.com/browser/dynamic-visibility-for-elementor/trunk/extensions/DCE_Extension_Visibility.php#L114And other non-matching things.
Could someone with knowledge in Elementor development please help me on this one. I’m a Elementor Pro “Plus” subscriber and a developer myself, but this is just taking too long for me to figure out.
Please help if you know anything about it.
If you want you can add me on Skype and I can easily show you within a few minutes with screenshare the whole situation to speed up the whole process. I send you my Skype ID privately.
Thank you so much in advance!
- The topic ‘One Dynamic Field – Help / Question’ is closed to new replies.