Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Blueprint - Dialog Wizard - Form validation does not work

Mousset Michael June 7, 2018

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

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian community, job interviews, interview tips, career advice, interview preparation, job search, interview experiences, hiring process, atlassian careers, community discussion, interview best practices

Interview Tips & Pet Peeves ✍️

Join the discussion on interview best practices and common pitfalls. Share your experiences and learn from others in the Atlassian Community.

Share you experiences!
AUG Leaders

Atlassian Community Events