Question about Confiform Macro

E Lin _alittlenooneblog_ June 15, 2023

Hi I have created a form and was wondering, When adding an attachment field macro, Is there a way to add a validation rule or condition that would prevent file from exceeding 10MB? I know this is already on general configuration on the Cloud but from a server level can we added to the  Confiforms? 

1 answer

0 votes
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 15, 2023

Hi @E Lin _alittlenooneblog_ and welcome to this community

You can set up ConfiForms to validate the file size

See this demo: http://recordit.co/tzrW4hAGZD

And the configuration as storage format for this demo for you reference

<ac:structured-macro ac:macro-id="b87c1a95-4e47-4aea-b3d8-6a808d41b4e5" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="178bc766-af1b-4caa-8e17-faad873a052c" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:parameter ac:name="type">Embedded</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="9f3bfc0c-681a-4d54-b106-888d0f583f61" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">attach</ac:parameter>
<ac:parameter ac:name="fieldLabel">attach</ac:parameter>
<ac:parameter ac:name="type">file</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="32cad2c4-d10f-48df-9d8e-181e8b50895f" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">attach.asAttachment.fileSize:&gt;1000000</ac:parameter>
<ac:parameter ac:name="fieldName">File is Too Big. Can upload only up to 10MB</ac:parameter>
<ac:parameter ac:name="action">Validation rule</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>

Alex

E Lin _alittlenooneblog_ June 15, 2023

Thank you so much Alex! this is great! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events