Have custom form Javascript enforce edit forms having one step, in case the custom form forgets to.
This commit is contained in:
parent
072512c220
commit
ff76c04e9f
1 changed files with 2 additions and 1 deletions
|
@ -87,7 +87,8 @@ var customForm = {
|
|||
this.editType = $("input[name='editType']").val();
|
||||
this.entryType = $("input[name='entryType']").val().capitalizeWords();
|
||||
this.secondaryType = $("input[name='secondaryType']").val().capitalizeWords();
|
||||
this.formSteps = $("input[name='steps']").val();
|
||||
// Enforce one step for edit forms, in case the form forgets to
|
||||
this.formSteps = this.editType === 'edit' ? '1' : $("input[name='steps']").val();
|
||||
this.returnView = parseInt(this.returnViewField.val()); // returns NaN for empty string
|
||||
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue