Suggestion: Conditional Logic – Field Visibility
-
Will be grate if plugin have possibility to compare two fields. Field tab Visibility, and chose field, rule Is or Contains and Value other field id or name. Examples if Number input is equal Value of Select or one Number(calculated) value is bigger than other Number(calculated) value.
Thank you!
-
Hello @jevgenisemt
Hope you’re doing well today! Thank you for reaching out to us.
If I am understanding this correctly, you are looking to show/hide fields based on the inputs made / values calculated on the form.
In that case, indeed the Select Field, Number field and calculation fields have visibility conditions wherein you can set a visibility condition for the number and/or the calculation field. For the number and calculation fields the value can be “greater than, less than” For example in the below screenshot, I am adding a condition on the number field to show only if the Value of select field is 10.
https://monosnap.com/file/ldBV8rmZ7HSE2YKQwjZnyIcrIZZEcjBased on that, I also added another select field which will show when the calculation field total “is greater” than 30, please refer to the screenshot here: https://monosnap.com/file/f6i2wr0zTCSPBSSw6oztK7m2FMfK0u
However, in case you are looking to have something different as you also mentioned about the possibility of comparing two fields, would it be possible for you to share a more detailed logic (preferably with the form export) so that we can understand this better?
To share the form export
– Navigate to the “Forminator -> Forms” page in your site’s back-end
– click on a little “gear” icon next to the form in question
– select “Export” option
– copy given export code and paste it at?https://pastebin.com
– include link to that paste in your response below.Note: this export will not include any data that is already submitted – they’ll stay safely on your site and we don’t need them anyway.
Additionally, you can also refer to the conditional logic (visibility rules) document here https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#Forminator-Conditional-Logic
Kind Regards,
SaurabhHello, Idea is If Select(Fruits) has options with values (Orange – 10, Apple -20, Carrot – 30) and Number field (Sugar), then form is filling will be grate if possible to direct compare if Fruits value Apple(30) equal(or biger, or less) Field value(Sugar) then show some fileds or Html text.
Now we are doing with calculation field: if (Fruits – Sugar) = 0 (equal) then show some fileds or Html text.
Also we have task: Company have list of Services with uniq Ids, and form has two field Select service and enter service ID. Form will show other fields and will be sent, if entered correct Service ID (Equal for Selected service from select field), Only customers who nows ID can fill and send form.
Field -> Submit : Show Rule: Field -> Service ID Condition IS Value Field -> Select Service.
Anyway, thank you for your attention
Hi @jevgenisemt,
Now we are doing with calculation field: if (Fruits – Sugar) = 0 (equal) then show some fileds or Html text.
Other than the above, you could also use the Calculation field to display based on “Is greater than” or “is lesser than” as shared in the following screenshot ie to display different calculation fields based on the condition:
View post on imgur.com
However, other than the above I’m afraid at the moment there isn’t any other feature for comparisons available at the moment.
Also we have task: Company have list of Services with uniq Ids, and form has two field Select service and enter service ID. Form will show other fields and will be sent, if entered correct Service ID (Equal for Selected service from select field), Only customers who nows ID can fill and send form.
Maybe I’m missing out on anything specific regarding the above, however, it sounds like the above is also possible using Visibility conditions, could we know the current limitation faced while setting up such a form?
If you could provide the form export as requested before it would be helpful so that we could check if any improvements could be considered in future updates.
Kind Regards,
Nithin
Hello, One improvement will be grate: Then using select field it possible to use “Bulk Edit” -> Import CVS, it possible to import only “Option label”, “Option value”, “Selected”, But not calculated values.
We have more than 150 Options, and after Import we still need manually enter all calculated values.Here is my form (some text in finish) https://pastebin.com/B0gDB7RQ, comparison via calculation work fine.
Hi @jevgenisemt,
Hope this message finds you well.
Thanks for your feedback we appreciate it, also, I shared it with our Forminator team. Implementing a new feature in our system is not a straightforward task. It requires careful evaluation, planning, and development to ensure that it meets our quality standards as well as the specific needs of our users. We need to consider various factors such as technical feasibility, compatibility, and potential impact on existing functionalities.
While we cannot provide you with an exact timeline for implementation at this point, please be assured that we have noted your suggestion and it will be carefully considered in our ongoing development discussions. We appreciate your patience and understanding as we work to deliver the best possible experience for all our users.
Best regards,
LauraHi @jevgenisemt,
After checking with the devs, they shared this snippet:
https://gist.github.com/wpmudev-sls/6f1c8989a170b8f02026354ffe5ad24f
It should import the calculation values from the CSV, too, but uploading the CSV during site installation is required.
Additionally, you need to update this line with the CSV name and the {select-x} you want to import the values:
'select-1' => WPMU_PLUGIN_DIR . '/sheet1.csv', //Please change the select field ID & CSV file path, if required
You might need to install it as a mu-plugin following the instructions on this link https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins.
Best regards,
LauraThank you for your quick responses, Of course I understand that developing a plugin is a complex and lengthy process, and not all user requests can be implemented at once. Thank you very much for your help and advices. You are doing a great job, your plugin is used in many projects, at the moment it is the best plugin for forms, and of course the best support.
All the best
- The topic ‘Suggestion: Conditional Logic – Field Visibility’ is closed to new replies.