1

In my Contact us form I have one Checkbox Field (signup for news letter), if user clicked that checkbox then I have to trigger 1 goal else skip the goal. As of now goal is triggered all the time because its associated with Save action button.

How we can trigger conditional goal in Sitecore 9.1 forms, means it should trigger if checkbox is checked else skip.

enter image description here

1 Answer 1

4

There is no condition-based submit action in Sitecore Forms yet but you can achieve this by adding your custom action or using conditional logic for your forms. I have not tried this yet but I will suggest the conditional logic for this. The Sitecore Forms application lets you apply conditional actions to fields in web forms. You can apply conditions to create dynamic change forms that fine-tune fields based on user entries - https://doc.sitecore.com/developers/91/sitecore-experience-manager/en/use-conditional-logic-for-your-forms.html

In your case, you can simply add two submit actions on the form and based on the checkbox value can show and hide the one submit action.

enter image description here

Then you need to add the submit action for the different submit actions, where one will have the trigger goal action and another will not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.