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?
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:>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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.