Home > Forum > Rules, JS, SQL > Dynamically hide / show form fields based on field GUID (Javascript)

Dynamically hide / show form fields based on field GUID (Javascript)
0

Hi all!

I want to hide / show / mark as required some form fields based on field Guid.

Is there a way to do this easily?

When I look at the signature of e.g. Hide function it just seems to take some shrinked DB name (e.g. AttText35) or field id (integer), which is different between environments.

Appreciate any hint into right direction.

Thanks in advance & best regards, Nik

MVP

Hi Nik,

I don't know the use case, but it sounds strange.
The only reason I can imagine you are using GUIDs is, that you are displaying the form in an iFrame and are passing the GUIDs via a message to the form. :)

Nevertheless, I would use an HTML field in which a business rule returns a mapping of field GUIDs to ids in JSON format. This mapping can then be used to get the integer id based on your GUIDs.
I'm doing something similar here, you need read until the end / until "2 Breadcrumb".
https://daniels-notes.de/posts/2023/ux-form-rules-revised#1-common-functions


Best regards,
Daniel

Privacy overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.


To see a full list of the cookies we use and learn more about their purposes, visit our Privacy Policy.