Hello,
I'm creating a blueprint with a dialog wizard, and I'm trying to use the built in form validation as stated in the documentation.
Using an input field as follow inmy soy template :
<form action="#" method="post" class="aui" id="valid-form">
<fieldset>
<div class="field-group">
<label for="startDate">Start date*</label>
<input id="startDate" class="medium-field aui-date-picker" type="date" name="startDate" data-aui-validation-dateformat="d/m/Y" data-aui-validation-dateformat-msg="This is not a valid date" data-aui-validation-field>
</div>
</form>
In javascript file, I have following code :
Confluence.Blueprint.setWizard('my-package', function(wizard) {
wizard.on("submit.page1Id", validatePage1);
}
From what I understood, my function validatePage1 should not be called, if the form has an invalid field.
I can see the msg near to my field when it is invalid, I can also see the
data-aui-validation-state
attribute which has value invalid in my field, but anyway, if I click on next button on my wizard which has several pages, I end up in my validatePage1 function, and form is still submitted.
What did I do wrong here?
Thx for any help
Michael
Join the discussion on interview best practices and common pitfalls. Share your experiences and learn from others in the Atlassian Community.
Share you experiences!Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.