You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking for a way to programmatically modify existing page conditions or set page conditions.
My use case is that I have a multi-page form where visibility of certain pages depend on the value of a Craft CMS global field. I’d like to update the condition dynamically via PHP or JavaScript when the form is being processed or rendered.
This is my condition in the UI
and I want to be able to set 2100 with the value I fill in in a global/entry field.
Is there an existing way to modify page conditions programmatically?
Additional context
No response
The text was updated successfully, but these errors were encountered:
With 1 being the index of the page you want to modify. It's a bit overcomplicated due to the lack of handling with Twig and setting nested variable values, so sorry for all the merging rubbish! Maybe one day we'll be able to do:
{% do form.pages[1].settings.pageConditions.conditions[0].value = '2200' %}
Question
I'm looking for a way to programmatically modify existing page conditions or set page conditions.
My use case is that I have a multi-page form where visibility of certain pages depend on the value of a Craft CMS global field. I’d like to update the condition dynamically via PHP or JavaScript when the form is being processed or rendered.
This is my condition in the UI
and I want to be able to set
2100
with the value I fill in in a global/entry field.Is there an existing way to modify page conditions programmatically?
Additional context
No response
The text was updated successfully, but these errors were encountered: