Hide/Unhide textfields using CustomHTML but validation gives error

Confluence User - 26 Dec, 2017

Description: I have a form which consists of textfields and sub forms. So, i am hiding, un-hiding them using                                  customHTML. Some fields are mandatory as well.

Problem: When i submit the form, it gives validation error, even when that field is hiding. Please, tell me what                              property to set using Jquery or Javascript for that variable to make it non-mandatory when i am                                hiding it to solve this. 


Note: It's a complex form so don't tell me to dont use customHtml for hiding it.

forms;form;validation

5


27 Dec, 2017
confluenceUser
confluenceUser

Hi

Attached is a sample app based on my understanding of what you are trying to achieve. Is it close?

You may modify the app to your requirement and reattach here for the community feedback/evaluation.

APP_29823163-Teacher.jwa

27 Dec, 2017
confluenceUser
confluenceUser

Thanks. Let me take a look at it.

 

27 Dec, 2017
confluenceUser
confluenceUser

I have made changes to the app you posted that describes my problem. Just open the parent form.

 

APP_29823163-1-20171227181020.jwa

27 Dec, 2017
confluenceUser
confluenceUser

Hi

Best practice is to have separate setup menu to add:

  1. Partner in Charge
  2. Referral Partner
  3. Client

And to automate the 'id' of the above fields using either Auto Generated Id or UUID (system generated). This is so that the selectbox can pick the above 1,2 & 3 records and save into the parent table accordingly.

If you combine the selectbox of say "Partner in Charge" with an subform to add the "Partner in Charge", when the user add the new "Partner in Charge", the field "partnerInCharge" will always be empty. Some records will have "partnerInCharge" value and some will be empty, cos the user input the value into the add subform.

Have a look at the Simple Leave & Vacation app (https://marketplace.joget.org/jw/web/userview/mp/mpp/_/vad?id=APP_leave-v1): the setup leave type and setup leave entitlement is a separate menu. When the user apply leave, he just selects from the pulldown menu the type of leave he wants. Best not to combine the add/select function in the same form.


 

 

 

 

 

27 Dec, 2017
confluenceUser
confluenceUser

Sir, 
     I understand what you are saying and I know that it is a better practice but unfortunately it's a client's requirement and you know how it goes. So, I am afraid I have to find a work around of this. 
Just tell me how to remove the required property using Jquery or Javascript for a joget field.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print