Field Message is mandatory when you choose "Need Message" I'm hiding the field with javascript when no is selected. I want the span required (*) to be present Everything's fine at first step You choose "NO" validator is disabled, "YES" validator do is job Problem is when you return from summary page, validation is ok but field is no more mark as mandatory (I want "required" span to be present). (Span is rendered on validator value, not on required: required) What I'm I doing wrong? How do you guys do for conditional validations?
Of course I could solve the problem with javascript but I would like to understand :-)
renderingOptions:
submitButtonLabel: Soumettre
fluidAdditionalAttributes:
novalidate: 'novalidate'
identifier: simpleA
type: Form
label: 'Simple A'
finishers:
-
options:
subject: 'Your message: {subject}'
recipients:
[email protected]: 'Test Company'
senderAddress: [email protected]
senderName: Tests
format: html
attachUploads: true
translation:
language: default
title: 'Confirmation'
identifier: EmailToReceiver
renderables:
-
renderingOptions:
previousButtonLabel: 'Previous'
nextButtonLabel: 'Next'
identifier: page-1
type: Page
label: 'Test Form'
renderables:
-
properties:
options:
1: 'No'
2: 'Yes'
fluidAdditionalAttributes:
required: required
type: SingleSelect
identifier: sel-message
label: 'Need Message?'
defaultValue: 1
validators:
-
identifier: NotEmpty
-
defaultValue: ''
identifier: message
type: Textarea
label: Message
properties:
fluidAdditionalAttributes:
required: required
placeholder: 'Your message here...'
variants:
-
identifier: varMessage0
condition: 'stepType == "Page"'
label: 'Message 0'
validators:
-
identifier: NotEmpty
-
identifier: varMessage1
condition: 'formValues["sel-message"] == 1'
label: 'Message 1'
validators: []
-
identifier: varMessage2
condition: 'formValues["sel-message"] == 2'
label: 'Message Included'
validators:
-
identifier: NotEmpty
validators:
-
identifier: NotEmpty
-
renderingOptions:
previousButtonLabel: 'Previous'
nextButtonLabel: 'Next'
identifier: summary
type: SummaryPage
label: Summary