Hi,
As the subject stated, how to do it?
What I want is to give 2 links to user' email, both of them will direct the user to the same certain page within a form, the different is one link will give a parameter which will trigger approval action and the other will trigger the rejection action. In this case the action sign is sent as parameter.
How to do it?
Thanks in advance for the help.
how to send the parameter to page?
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
You set up a field in your form and make it a URL Parameter - this is an option in the field's properties. This means that you can pass this field's value on the URL that invokes the form. Then you check this value in a before form event and go to the appropriate page. So if the parameter field is p1, the URL (in V5) will be something like:
http://hostname:port/webapp/myForm.eb?p1=page2
..and your code in the before form event will be something like:
http://hostname:port/webapp/myForm.eb?p1=page2
..and your code in the before form event will be something like:
Code: Select all
var pageName = fields.p1.value;
if (pageName)
{
form.gotoPage(pages.getPage(pageName));
}
0 x
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
Thanks for the explanation.
Is it applicable to the page too? What I mean is I need to send the page within the form that parameter (to be processed by that page).
Is it applicable to the page too? What I mean is I need to send the page within the form that parameter (to be processed by that page).
Jon wrote:You set up a field in your form and make it a URL Parameter - this is an option in the field's properties. This means that you can pass this field's value on the URL that invokes the form. Then you check this value in a before form event and go to the appropriate page. So if the parameter field is p1, the URL (in V5) will be something like:
http://hostname:port/webapp/myForm.eb?p1=page2
..and your code in the before form event will be something like:
Code: Select all
var pageName = fields.p1.value; if (pageName) { form.gotoPage(pages.getPage(pageName)); }
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
This question doesn't apply in Ebase - field values are stored at form level and are automatically available to all pages within a form, you don't need to (and you can't) pass parameters to individual pages.Is it applicable to the page too? What I mean is I need to send the page within the form that parameter (to be processed by that page).
You can pass any number of parameters into a form when the form is started from a URL and these are then saved as form fields. You can use these if you want to route control to any specific page. If you want to do any processing before a page is displayed, you do this by adding a before page event - to do this, right click on a page in the Pages View and select events. Or alternatively you could do this processing in a before form event.
0 x
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
Thanks a lot Jon,
It clear now, so I can take another approach to get what I want.
It clear now, so I can take another approach to get what I want.
Jon wrote:This question doesn't apply in Ebase - field values are stored at form level and are automatically available to all pages within a form, you don't need to (and you can't) pass parameters to individual pages.Is it applicable to the page too? What I mean is I need to send the page within the form that parameter (to be processed by that page).
You can pass any number of parameters into a form when the form is started from a URL and these are then saved as form fields. You can use these if you want to route control to any specific page. If you want to do any processing before a page is displayed, you do this by adding a before page event - to do this, right click on a page in the Pages View and select events. Or alternatively you could do this processing in a before form event.
0 x
Who is online
Users browsing this forum: No registered users and 14 guests