We have soem required fields in the form. But, when a user is rejecting the form, they need not fill out all of the required fields. Is there a way to skip this validation please?
Thanks
Priya
We have soem required fields in the form. But, when a user is rejecting the form, they need not fill out all of the required fields. Is there a way to skip this validation please?
Thanks
Priya
Hi Priya,
I have this issue myself. What I end up doing is enabling and disabling the required fields within JS. First all the fields you toggled to be required on the layout page turn off. Then in JS you'll want to add these:
$('.classname input').attr('required','True'); $('.classname label.cf-label').append('<span class="cf-required">*</span>');
then to turn off the required use the following:
$('.classname input').removeClass('required').removeAttr('required'); $('.classname span.cf-required').remove();
Because I have a lot of fields on some of my forms, that are required, I end up making a function called toggleRequired(bool). I pass in a true on form load and then on the button click, such as 'Reject', I pass in a false in the function instead to remove all the required fields. This helped a lot for me when I have some forms that need to bounce between people and they are unable to fill in all the fields.
Hope that helps!
You would need to have 2 forms in Form process, the one that is originally submitted and the one that is being approved/rejected. Duplicate the Starting form you had created, all the variables will come with it. You can name this similar to the first but put Approval or something at the end to identify it. You can edit this form and make those fields not needed by the user to be not required.
In your Process Diagram, in the User Task, choose this form instead of the Starting for you now have.
You can have the fields hidden based on a checkbox or radio button. If the document is accepted they could check the box to show the required fields or you can reverse the method to hide fields if it will be rejected. Hopefully, I am explaingign it clearly.