Obtaining form parameters in a dynamic page

Hi
It is possible of course to create a form on a dynamic page and have a user provide input. But how can the user input be retrieved, if the user input is sent to the same page or to another Portal dynamic page? As a Portal dynamic page can only contain html and pl/sql between the <oracle> tags, it looks like there is no programmatic way (such as with perl or java) to obtain the information from the form and put it in one or more variables.
Is there a way to obtain the data from forms using pl/sql in a dynamic page? A code example would be most helpful.
Thanks very much.
Hugo

You can do it using two dyns or one dyn.
Using one dyn:
Define a parameter :p1 and let a default value for it(e.g. 1).
Construct a form that submits to the same dyn
begin
declare
v_p1 varchar2(100) := :p1;
begin
htp.p('<form name="example" action="" method="post">
<input type="text" name="p1" value="'||v_p1||'">
<input type="submit">
</form>');
end;
When you submit it to same page you will be able to see your new parameter value. If you want to use two dyns then submit it to second dyn.

Similar Messages

  • Read parameters in a dynamic page portlet?

    Hi,
    Is it possible to read input parameters in a dynamic page portlet?
    Am I missing something if I want to read the input_parameter?
    <oracle>
    ftp.p(:input_paramter)
    </oracle>
    Thanks a lot.

    Hi,
    It is not possible to read the input parameters in the <oracle> tag. You can read it in the additional plsql code. If you have
    to access the parameter deptno then do this in the additional plsql code section.
    for i in 1..p_arg_names.count loop
    if p_arg_names(i) = 'deptno' then
    htp.p(p_arg_names(i));
    end if;
    end loop;
    Thanks,
    Sharmila

  • How to get form fields in a dynamic page as a portlet

    I have a dynamic page(publish as portlet and added to a portal page) with a html form that has many radio button created dynamically (query a table and create as many radio button as records I found) and the name of each radio button is the id of the record from the table it represents.
    When I click the submit button of my form it will recall the same portal page and then I have to check which radio buttons where selected to update the database depending on it.
    The problem is that I can't get the radio buttons inside the dynamic page because they are created dynamically so I can't make them portlet parameters to be associated with page parameters.
    So How can I tell which radio buttons have been selected?
    Please help me.

    Hi,
    Write a procedure which will be called as the form action. This procedure should take an array of parameters like p_arg_names and p_arg_values. For example
    <html>
    <form>
    <input type="checkbox" name="p_radio">
    <input type="checkbox" name="p_radio">
    </form>
    procedure submit_form(p_radio in wwv_utl_api_types.vc_arr)
    begin
    for i in 1..p_radio.count
    loop
    htp.p(p_radio(i));
    end loop;
    wwv_redirect.url(<page_url>);
    end;
    Hope that helps.
    Thanks,
    Sharmila

  • Pass parameters to a dynamic page with MULTIPART

    Hello everybody,
    I'm facing with a problem that I still can't resolve...
    For some reasons I need to use a Dynamic Page as a form, so I create an html form (which contains also an <input type="file" name="file_test">) that call the same page with enctype="multipart/form-data".
    When I call the page to save the data, I can read all the parameters with :parameter_name, but I can't read the content of the file. If I try to get :file_test it contains only a file name.
    How I can get:
    1) the mime format
    2) the content of the file (binary)
    and then save it in a blob?
    Thank you in advance for your help...

    You can use sessions to pass values from one page to another.
    In page A you can add a value:
    v_user_session portal.wwsto_api_session;
    v_user_session := portal.wwsto_api_session.load_session(
    p_domain => 'yourDomain',
    p_sub_domain => 'sub');
    v_user_session.set_attribute(
    p_name =>'name',
    p_value => 'YourValue'
    v_user_session.save_session;
    The p_domain and p_sub_domain can be choosen freely but you must know that they have to be the same if you want the retrieve the value from page2:
    v_user_session portal.wwsto_api_session;
    v_user_session := portal.wwsto_api_session.load_session(
    p_domain => 'yourDomain',
    p_sub_domain => 'sub');
    yourValue := v_user_session.get_attribute_as_varchar2('name');
    This is how you can pass values without posting or without adding them to the URL.

  • Dynamic Page parameters

    Please help.
    I have 2 dynamic pages and I want to pass parameters between them
    in the 1st dynamic page I have:
    <FORM METHOD=POST ACTION="url/owner.dyn_crt_login.show">
    <INPUT TYPE=TEXT NAME=P_Login_In ID=P_Login_In>Login
    <INPUT TYPE=TEXT NAME=P_Pswd_In ID=P_Pswd_In>Pswd
    <INPUT TYPE=TEXT NAME=P_St_In ID=P_St_In>State
    <INPUT Type="submit" value="submit">
    </FORM>
    In the 2nd dynamic page I have 3 bind variables I am using
    :p_login_in, :p_pswd_in, and :p_st_in
    I get the following error when I click the Submit button:
    owner.dyn_crt_login.show: SIGNATURE (parameter names) MISMATCH
    VARIABLES IN FORM NOT IN PROCEDURE: P_LOGIN_IN,P_PSWD_IN,P_ST_IN
    NON-DEFAULT VARIABLES IN PROCEDURE NOT IN FORM:
    DAD name: portal30
    PROCEDURE : owner.dyn_crt_login.show
    URL : http:url/owner.dyn_crt_login.show
    PARAMETERS :
    ============
    P_LOGIN_IN:
    Nancy
    P_PSWD_IN:
    TANNER
    P_ST_IN:
    IN
    Thanks
    Nancy

    Hi,
    You cannot hide the parameters in the url. The GET method works like that. You can use the POST method to submit the parameters. But in your case the POST method may be not be appropriate.
    Thanks,
    Sharmila

  • How do I hide the Dynamic Page parameters from being displayed in the URL

    Hello,
    I am using a form to call a Dynamic Page and to send parameters to it ,
    is there a way to hide the parameters values from being diplayed in the URL
    when the Dynamic Paged is called .
    Thanks .

    Hi,
    You cannot hide the parameters in the url. The GET method works like that. You can use the POST method to submit the parameters. But in your case the POST method may be not be appropriate.
    Thanks,
    Sharmila

  • How to achieve dynamic page break in Smart form

    Hi
              1.How to achieve dynamic page breaks in Smart forms.
               2.What are the various table types in Smart forms.
    Regards

    <i>Dynamic page break : </i>
    create a node of type COMMAND and in its attributes check "Go to new page".
    <i>There are Tables and Templates in smart forms :</i>
    Use node type <i>Template</i> to display a table whose layout and size (number of lines and columns) is determined before the runtime of the print program else use <i>Table</i>.
    Take a look at <a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf">SAP Smart Forms (BC-SRV-SCR)</a>
    Regards

  • Dynamic page form

    I have a HTML form created as a dynamic page in portal
    the structure is as below
    <html>
    <script>
    some javascript ....for form validation
    </script>
    <body>
    <form>
    --form elements ..
    </form>
    </body>
    </html>
    When i have this dy page included in Portal page as portlet along with templates for the header foooter etc ..
    I cannot get my form to submit or the javascript to work ..
    as i think portal is putting the dynamic page code as is
    and so the portal generated html has multiple html/body tags ..
    whats is the right way to do this ..

    Hi,
    You can see the html source of a form with javascript when put on a page. You should do something similar for the dynamic page you write.
    -Sharmila

  • Basic question: how to submit a dynamic page form to a procedure?

    I am trying to submit a form created in a dynamic page to a procedure in portal. For some reason the procedure doesn't seem to execute. Can anyone give me a hint?
    Here is my code for the form:
    <html>
    <body>
    <oracle>
    begin
    htp.formOpen('portal_public.submit', 'post');
    htp.formText('textbox');
    htp.formSubmit('submit', 'submit');
    htp.formClose;
    end;
    </body>
    </html>
    I have created a procedure called "submit" in the portal_public schema...
    Create or Replace PROCEDURE PORTAL_PUBLIC.SUBMIT
    p_textbox_string IN VARCHAR2 DEFAULT 'default')
    as
    begin
    htp.print(p_textbox_string);
    exception
    when others then
    null;
    end;
    When I submit the form I get a generic IE "cannot be found" page.
    Can someone tell me what I'm doing wrong, I'm kinda new to this.

    I am trying to do the same type of thing. I want to have multiple rows on a form with checkboxes and use a plsql stored procedure to process the rows that are checked. The thing I have found is that is works with form method of 'GET'. I really need to use 'POST' though since I can have many rows to pass. GET attaches the passed variables to the URL. So, in your example, the actual URL would look something like portal_public.submit?p_textbox_string=whateveryoutypedin. Try changing your formOpen to use 'get' and hopefully you'll see what I mean.
    Anyone know anything about the difference on GET vs POST please let us know. Thanks!

  • HTML POST method in a dynamic page

    Greetings Portalists,
    I have a basic question here. I need to pass the values of an html form (constructed within a dynamic page) to a procedure to process the users' inputs. The form is highly dynamic in terms of numbers of parameters, but we're talking about upwards of 200 text fields that require passing. Now, I realise that this in itself isn't a problem, and I've set this up without too much difficulty using method="POST" - but the called procedure in the form's action=... attribute seems to need to be publicly-executable for this scenario to work. For a production environment, I don't want to keep the PUBLIC grant on the procedure, but whenever I revoke it, the Portal throws me back a 404 Not Found when I submit the form.
    So my question is this -- how can I tighten the security around executing the procedure? Are there any best practices for this sort of situation (which I can't imagine are all that rare)?
    I've searched through many various web toolkit and Portal documents looking for an answer to this but to no avail, so any suggestions really would be highly appreciated.
    Many thanks.
    *.s.*

    Granting execute to public make a procedure accessible to portal_public (the schema) which contains the mappings to all the authenticated light-weight users. You can keep the public or portal_public grant for execution on the procedure and yet have a good control on who would be able to see your form. That would be based on your pl/sql logic.
    For instance, if you wish to keep it for only authenticated users (users who are in registered with your portal) or with any certain group of users, you can always apply a block containing code for checking their group memberships. If a user belongs to your desired group, you can let the desired logic expose to them, otherwise not.
    Please check the portal pl/sql api's that come with portal version you are using, for help.
    AMN

  • Dynamic page search passing parametars problem

    I'm having problems with the search dynamic page in Oracle portal 3.0.
    I don't know how to pass the bind variables through the form in the Oracle manner, like p_arg_names and p_arg_values. Can someone please e-mail me a short search dynamic page like an example , how can a bind variable be passed through a from.

    Hi Sharmila,
    May I request this instead as the original thread seems to have died. I am trying to link a Oracle Form from a dynamic page, I am passing parameters from the dynamic page to the Oracle Form.
    Please may I have a simple example of this.
    Thanks Sharmila
    Greg
    Hi,
    Your question is not very clear. Are you creating a dynamic page or a portal form? Do you want to pass parameters to a
    form or from a form? Please elaborate.
    Thanks,
    Sharmila

  • Displaying header and border on a dynamic page passing parameters to a form

    I am using portals 10.1.4. and am trying to pass parameters to a form which appears as a portlet on a page.
    for this, dynamic page has been used to pass parameters to that desired form. my problem is this that when the form is displayed with parameters, the header and borders of the portlet disappear.
    The check-boxes for header and borders of the portlets on the page are checked. Yet, when for any reason, the parameters are not passed into the dynamic page, the header of the dynamic page and border are displayed. But when the parameters are passed and the form shows up, then the header and borders disappear.
    can anyone help me with the following:
    - is it the desired behavior?
    - how can i get the headers and borders reappear?
    thanks

    Any ideas fellows?
    how can we control the border and header of dynamic pages when a form or report is called from them with passed parameters?
    will appreciate any helpful experiences.

  • Header and border on a dynamic page passing parameters to a form

    I am using portals 10.1.4. I am trying to pass parameters to a form which appears as a portlet on a page.
    I am using the dynamic page to pass parameters to that desired form. My problem is this that when the form is displayed with parameters, the header and borders of the portlet disappear.
    The check-boxes for header and borders of the portlets on the page are checked. Yet, when for any reason, the parameters are not passed into the dynamic page, the header of the dynamic page and border are displayed. But when the parameters are passed and the form shows up, then the header and borders disappear.
    can anyone help me with the following:
    - is it the desired behavior?
    - how can i get the headers and borders reappear?
    thanks

    Hi AMN,
    I am not sure I follow what you are exactly attempting, can you post a set of steps to reproduce?
    Cheers,
    Mick.

  • How to create a form based on table using dynamic page?

    Hi,
    I need to create a form using dynamic page. How do you pass values from the html form to a oracle procedure that will get executed on submission of the form ? I could not find any documents which shows how to do that. Can anyone please help me out with an example ?
    thanks,
    Mainak

    Hi,
    Something seems to get added to the form action because of "http". Hence I am removing it.
    You need to write a procedure with the values in the as parameters. Say for example you want to insert a record into dept
    table then
    Dynamic page code
    <html>
    <body>
    <form action="portalschema.insert_dept">
    <input type="text" name="p_deptno">
    <input type="text" name="p_dname">
    <input type="submit" name="p_action" value="save">
    </form>
    </body>
    </html>
    Procedure code.
    create or replace procedure insert_dept
    (p_deptno in number,
    p_dname in varchar2,
    p_action in varchar2)
    is begin
    if p_action = 'save' then
    insert into scott.dept(deptno,dname) values(p_deptno,p_dname);
    commit;
    end if;
    end;
    grant execute on insert_dept to public;
    Hope this helps.
    Thanks,
    Sharmila

  • Passing value from dynamic page to form.....

    I have a portal page that has a dynamic page where I've created an html form. Also on this same page in different regions are three other forms which were created by the form wizard. From the dynamic page form I want to pass a session value to the other forms on the same page. Is this possible? I know it's possible from form to form using session apis. I've search the forum and have not found what I'm looking for. Can anyone be of any help on this topic?

    Melissa,
    It seems we have the same type issue.
    Session variable how to's are what I need also.
    There is a site with more information on it...a continuation of the Portal Handbook by Vandivier and Cox at home.covad.net/~idbexperts called an "Unpublished Case Study" - I don't know if it'll hit your needs on the head, but it may help to see it.
    I believe I am trying to hold session variables over til users complete a 4 part form across several pages (may be a space problem we have). Do you know how I start this?
    I don't know how to put p_session variables together, when or where the parameters are necessary and whether a procedure is necessary or not!!!
    If you would like to correspond offline, I am at [email protected] and would appreciate your insights.
    Mary

Maybe you are looking for

  • Please Help! Can't get Airplay ATV to work.

    Righto.  I bought ATV last week and have been working on this for a total of about 30 hours. Still nothing. I just cant get my late 2011 Macbook Pro to Mirror.  Bought Mountain Lion update - no AirPlay icon at the top of the screen. In System Prefere

  • HT1430 How to reset my iPod if I forgot the password

    How do I reset my iPod if I forgot my pass code

  • How to initialize the Http Tunnel Connection

    hi all, I am developing an application in which i have to get the images from the server.At first i have used the Apache Tomcat it was working fine in my localSystem. when the same application when getting the images from the server it was getting th

  • Animated Title in Premiere Elements 7.0

    I'm having problems in putting animation into a title in Premiere Elements 7.0. I begin making a title such as a title like this: Now the problem[ENTER] begins... When I type "Now the problem", I could apply an animation. Once I click ENTER & type "b

  • Leopard on an Intel Mac and ID CS2

    Have a client who will be upgrading her 2004 iMac G5 and needs to continue using ID CS2 for just a bit longer. Is this possible or must she upgrade InDesign as well? Thanks