Cameron Posted July 30, 2015 Report Share Posted July 30, 2015 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! Quote Link to comment Share on other sites More sharing options...
Jan Posted July 30, 2015 Report Share Posted July 30, 2015 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. 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.