Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

open form with according layout

eugzl
Level 5
Level 5

Hi All.

In my form when user fill the form the textField get some value. Then user save the form. Then form saved and closed. Based on value of textField I would like to open form with according layout.

What event I must to use if I have some conditions:

if textField1==3 then I would like to show only subForm1 when form is open;

if textField1==2 then I would like to show only subForm2 and subForm3 when form is open.

Thanks.

1 Accepted Solution
MinusZero
Correct answer by
Level 7
Level 7

Simplest way is with an if statement, switch would work also.

In the Form's docReady event [form1::docReady - (JavaScript, client)] put this:


if(textField1.rawValue == 3) //if the textfield is 3, show subForm1
{
subForm1.presence = "visible";
}

else if(textField1.rawValue == 2) //if the textfield is 2, show subForm2
{
subForm2.presence = "visible";
}

else //if the textfield is anything else, do nothing.
{}

View solution in original post

1 Reply
MinusZero
Correct answer by
Level 7
Level 7

Simplest way is with an if statement, switch would work also.

In the Form's docReady event [form1::docReady - (JavaScript, client)] put this:


if(textField1.rawValue == 3) //if the textfield is 3, show subForm1
{
subForm1.presence = "visible";
}

else if(textField1.rawValue == 2) //if the textfield is 2, show subForm2
{
subForm2.presence = "visible";
}

else //if the textfield is anything else, do nothing.
{}

View solution in original post