cancel
Showing results for 
Search instead for 
Did you mean: 

formcalc hide page

luscruz
Participant
0 Kudos

Hi all,

I have 4 pages in my form, and i want to hide the third page.

How can i hide a page in formcalc (and re-number the total of pages)?

I tried this:

if( $record.GV_NOT_AUTHORITY_CHECK == "X" ) then
	$.presence = "hidden";
endif

Thanks,

Luis Cruz

Accepted Solutions (0)

Answers (1)

Answers (1)

chintan_virani
Active Contributor
0 Kudos

Luis,

The coding looks okay to me but you have not mentioned where do you write the code? That should probably help in finding the solution.

Alternatively this is what I did and it works perfectly:-

1. Created a sample form (called form1) with 3 pages (FormPg1, FormPg2, FormPg3), 1 Mater Page (Page1).

2. Drag-drop Page n of m element from the Custom library onto Master Page.

3. Placed 3 textfields (TextField1, TextField2,TextField3) one in each of the above pages.

4. In TextField1 exit event wrote the following code in JavaScript:-

if(TextField1.rawValue == "X")
{
	FormPg2.presence = "hidden"; \\ will hide the page2.
}
else
{
	FormPg2.presence = "visible"; \\ will keep page2 visible.
}

This does recalculation and Page n of m displays correct numbers.

So check the event where you fire the code, and also try to keep complete hierarchy form1.FormPg1.presence if its still not working.

Chintan

luscruz
Participant
0 Kudos

Hi Chintan,

I tried what you said, but it still doesn't recalculate.

I placed the code on 'initialize' of 'data' (the first level of the hierarchy).

In my form i only have 3 pages, and appears 1 / 5.

Any other idea?

Thanks!