This demo shows how to setup a form with 2 time fields and ensure the end time is AFTER the start time
ConfiForms Form Definition |
---|
|
INLINE
starttimeStart timetime endtimeEnd timetime starttime:>[entry.endtime]End time shall be after the start timeValidation rule |
Source code
Code Block |
---|
<ac:structured-macro ac:macro-id="1704af11-8fd4-4be0-8b7a-2c42c968f000" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">myform1</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="93038ad6-d15a-4390-9098-e135b951c861" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="c2f8e682-a1ed-45cc-9946-e65b72acebbe" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">starttime</ac:parameter>
<ac:parameter ac:name="fieldLabel">Start time</ac:parameter>
<ac:parameter ac:name="type">time</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="e3b76b9a-1e9a-40b0-8bc4-c62c11ef52ef" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">endtime</ac:parameter>
<ac:parameter ac:name="fieldLabel">End time</ac:parameter>
<ac:parameter ac:name="type">time</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="1e1f6ea2-d8ab-456e-b1aa-416830393d27" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">starttime:>[entry.endtime]</ac:parameter>
<ac:parameter ac:name="fieldName">End time shall be after the start time</ac:parameter>
<ac:parameter ac:name="action">Validation rule</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro> |