PHPRad Classic Initial 2.7.3 Forum

PHPRad Forum => Questions => Topic started by: joko2024 on January 20, 2024, 10:02:41 AM

Title: Field Control Properties
Post by: joko2024 on January 20, 2024, 10:02:41 AM
Please Help
I want to control the Validation Properties via client even ..This is what I mean (https://1668551510-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LX9DH2Xu_Dbrl1gBTW6%2F-LebYbS9M8a0-y1kdt2R%2F-Lebcaae0THw_dq-WFgQ%2FAddPage%20Field%20Properties%20Required.png?alt=media&token=49957808-95b7-4040-be6a-b47eb768b7e8)
(https://docs.phprad.com/phprad-pages/pages/page-field-properties/add-page-field-properties)


what I have done

Code: [Select]
  $('#Vb_akhir').prop('Required', false);
but doesn't Work ... The Submit button didn't worked until i input the value into form of Vb_akhir Field

what i suppose to do?
Title: Re: Field Control Properties
Post by: willvin on February 05, 2024, 02:14:14 PM
set the required to false and then you can use js to set it to required or not.  Setting required to true, will throw errors as the server is also expecting that field, but if you make it not required, the server code will not be expecting that field.
Title: Re: Field Control Properties
Post by: joko2024 on February 05, 2024, 02:26:47 PM
set the required to false and then you can use js to set it to required or not.  Setting required to true, will throw errors as the server is also expecting that field, but if you make it not required, the server code will not be expecting that field.
Ok Wilvin , I Would Try your sugestion. Anyway thanks