Jump to content

Is It Possible To Mark File Filed As Required By Rule?


Recommended Posts

Hi everyone!

 

I have a File field and a checkbox. I have created a Rule: if the checkbox is checked, make the File field required.

 

The field is required, but it is not marked as required. Is it possible to mark it also?

 

 

 

Any ideas are very much appreciated!

 

Thank you for your time!

Link to comment
Share on other sites

Hi Cameron,

 
I had the same problem. I have used a following trick:
 
1) For every File field:
a) Add before the field a Virtual field, select the Checkbox Form element; on the Advanced tab, check the On load Checked by default checkbox.
B) Copy the text of the Label of the File field to the label of the correspond Virtual field.
c) On the Advanced tab of the File field, in the Label position dropdown, select No label.
 
2) Go to the Rules tab, edit your rule: make all added Virtual fields required.
 
3) Add a Header & Footer element, select the Header element, click the Source button, and enter the following code:
<style>
#cbParamVirtual1, #cbParamVirtual2, #cbParamVirtual3 {display:none !important;}
#cbParamVirtual1 + span, #cbParamVirtual2 + span, #cbParamVirtual3 + span {display:none !important;}
</style>

I have three File fields and I have added three Virtual fields. You can add as many Virtual fields as you want, just add for every field

, #cbParamVirtualN
to the first line and
, #cbParamVirtualN + span
to the second line, where N is the number of the Virtual field.
 
I hope it helps.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...