Start a conversation

Using the sc_field_display and sc_label macro in an Ajax event.

In this guide we will learn how to show/hide a field dynamically by clicking in a radio button with an ajax event on it.



1) First we will need to create a new field, and set it as Radio.

2) Then we will configure the Edition Lookup of that field, we need to set the Method as Manual and add two Radio Buttons, one with the value "1" and the label as "Yes" (set this as default) and the second one as "No" and the value "2", its important to change the column value to "2".

3)  In this step we will create the Ajax Event "onClick" on the field "location".

4) Theres the code we have to put inside the event we created.

5) To make the layout better, we will rise the created field above the ones we want to hide.

6) And finally we will change the "location" field label to a new one using the sc_label macro.


sc_label("location") = "Mostrar Endereço?";

7) Application running when "Yes" is selected:

8) Application running when "No" is selected:

Choose files or drag and drop files
Was this article helpful?
  1. Amanda Santos (Migrated deleted Agent)

  2. Posted
  3. Updated