Crocoblock / suggestions

The suggestions for CrocoBlock project
195 stars 78 forks source link

[JetEngine] Add Dynamic Selector for switcher #7611

Closed rob1998 closed 2 months ago

rob1998 commented 2 months ago

Description

Introduce a new dynamic selector for fields. For example text (text, textarea, URL, email) and number fields. This selector should allow users to select a switcher option/meta field and then provide two fields: one for when the value is true and another for when the value is false.

Proposal

Create a dynamic selector that integrates with text and number fields, enabling users to choose a switcher option/meta field. This selector should provide two input fields: one for true values and another for false values. If possible, these fields should support dynamic content.

Current Limitation

Achieving this functionality currently requires using dynamic visibility, which necessitates duplicating widgets for handling different values.

Benefits

This feature streamlines the process by eliminating widget duplication, enhancing usability and efficiency for users.

Example Use Case

If a switcher is on, I want to link to a landing page; if off, I want to link externally. Another use case could be displaying a specific message based on the switcher's state, avoiding the need to duplicate content blocks.

Screenshot 2024-07-09 at 14 54 46
Crocoblock commented 2 months ago

Hi @rob1998

To solve this problem, you can use a shortcode image image