This topic is locked
[SOLVED]

 Custom entry page passing parameters to nested sql request for result

10/30/2013 12:09:19 PM
PHPRunner General questions
C
ccadivel author

Hello,

I'm writting a small application that gets user data from a custom form page (typicaly not associated to any table) than processes the data collected from the user and then pass calculated parameters to a list page in order to display the results.

Typically given the birthdate, sexe, and language, the custom page processes all the input and pass the result (syllid, $nakshatraid, $padaid) to a sql request (PHPR list page based on the main table) and display the result.
I use PHPR to create the application to administrate all the tables (with specific privileges) but the end user sees only the form page and result page.
The result is given by this request and all the parameters ($vars) are computed from the data entries.

select P.prenom

from PRENOMS P

where P.sexe = $sexe

and P.prenlang = $language

and P.syllid in select S.syllid

from SYLLABES S

where S.naksid = $nakshatraid

and S.padaid = $padaid;
First, Is it possible to do that ? How can I do it ?
Second, My form page looks "naked" and I'd like to give the same look and feel of PHPR generated application, specially have the menu on top. How cand I wrap my custom page to give generated PHPR apps apperance ?
Regards,

admin 10/30/2013

My suggestion is to create a dummy custom view in PHPrunner and use one of pages as your custom entry form. This is one of the easiest options to make your custom page look exactly like the rest of your application.

C
ccadivel author 10/31/2013

Hello,

What do you mean by dummy custom view, because I created a view based on the table prenoms and modified the SQL but the issue is still the same, how to collect the inputs.

Regards,

admin 10/31/2013

Instead of creating a "naked" form create a "custom view" in PHPRunner and use one of this view pages (i.e. Add page) as your form. You can collect inputs in BeforeAdd event of this form for instance.