- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 06:37 AM
After creating a UI Policy and set a field as visible='false' is not displayed in the form. Totally agreed and working fine.
But when we inspect the field above or below that particular field and change the type="text" or remove the type, then that field is visible.
Now any one can give the value to that particular field which should be visible='false' according the UI Policy.
Here anyone can inspect and give the value what the user wants to give. Is their a better way for Hiding the form field?
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 11:16 PM
hi all,
thanks for valuable information. I got the answer for my question. cheers
thanks
Madhava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 07:18 AM
Hi Madhava,
Yes You can hide a field using the client script. UI policy is better way rather than writing a client script when comes to hiding a field or making it mandatory or Readonly. If still you want to hide a field you do it using client script. You need to write a IF ELSE condition based upon your requirement.
g_form.setDisplayValue('fieldname', false);
Thanks, Hope this is helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 07:25 AM
Hi Harish,
I don't think setDisplayValue function works on the client side. It is aerver side function. For client side we have g_form.setValue('fieldname', false);
@Madhava... No need to worry about the source code. Users are not allowed to edit the source code. Just go for UI Policy. It will work perfectly fine till the form is dead (R.I.P form )
Thanks,
Arnab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 07:32 AM
Hi Arnab,
Thanks for correcting me.
Madhav you can use this in client side.
this is the correct g_form.setDisplay('fieldname', True/false);
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 07:37 AM
Hi Madhaba,
you can use either setVisible(fieldName, boolean) or setDisplay(fieldName, boolean) in client script but as Arnab mentioned use of ui policy is best practice for that perpose.
Thanks,
Farukh