Two Forms submiting wrong action

Hi all,
I have a problem that occurs in a page that includes another jsf and i have one form in each one. When submit one the first managed-bean responsible to first form is called. It's something like this:
order/view.jsp ======================
<f:subview id="order">
<h:form>
<h:commandLink action="list" value="list">
<h:outputText value="<< Voltar"/>
</h:commandLink>                    
</h:form>
</f:subview >
<f:subview id="item">
<c:import url="../item/list.jsp"/>
</f:subview >
item/list.jsp ======================
<h:form id="item" >
<h:commandLink value="view" action="#{item.view}" >
<h:outputText value="#{itm.name}" />
<f:param name="divisionId" value="#{itm.id}"/>
</h:commandLink>
</h:form>
I have a view action in Order Bean and when i call Item view action in the link bellow the Order view action was called redirecting to Order view page and a "Can't instantiate class: 'Can't set managed bean property: 'id'.'." exception occurs.
att.,
Flavio Leite

Sorry, is a managed-bean and itm is a property of a managed-bean called Item.
It's not my application in this example but i think that it is more familiar to almost people threat like a Order/Item Master/Detail form.

Similar Messages

  • Struts : Validating two forms in a single page , on a single submit

    In my JSP page, i have two forms, with modifiable feilds. I'm using submit button of the 2nd form to submit both forms (ie. <form action="someAction2.do" onsubmit="return firstForm.submit();"> )
    Two forms have different actions which is specified in structs-config.xml. Validation(server-side) is done using validation.xml file.On success/failure, both these actions are mapped to the same (input) JSP page.
    Problem is that, validation errors in second form only is displayed. This is because, as soon as 1st form returns validation errors, the second form gets submitted. How can i specify that 2nd form should be submitted only if the 1st form doesnot return any validation errors. I know its possible using javascript at client side, but i want this validation on server-side.
    Can any one please help me out. Thanks

    Off hand I dont know the answer to your question. But since no one answered your question, here are my 2 cents worth:
    I suggest all your JSP pages have one and only one form tag. Re write your JSP page. Make sure all your variables your submitting have unique names. (no duplicate names). As far as I know, having multiple forms on a JSP page is not normallly done and makes it difficult to alter by another programmer after you leave the company.

  • Two forms on same page..save state of one form while submitting other.

    Hi....
    I have 2 form on same page....
    first is form on table....
    nd another is tabular form.....
    now if I make an entry in both table ,,,,and after entering data in tabular form if click on submit button of tabular for the data of tabular form get submitted,,but the data I have been enter in first form get erased.....
    now my question is how can I save state of my first form even after clicking on submit button...........
    pls,help.

    Hi Shirish,
    in your scenario you can write manual process for one form in your both forms, using this way you can achieve you functionality.
    do the above and for that manual process keep the button name as your second form button means, for two forms saving with only one button.
    i am not sure in this, but you can try something.
    Thanks
    Chandran
    Edited by: Chandran on Nov 28, 2011 2:21 AM

  • Two form actions

    hello again. i did a search and found a thread where someone
    else asked if it was possible to have two form actions, but the
    person who responded didn't say it was impossible, just that they
    didn't need to.
    i think i need to have two actions, unless someone can tell
    me how to tell my formmail to also send the results to an ASP form
    processor on a different website.
    basically, my company started using a web-based lead
    management program, and they want the results to go there as well
    as the emails we get now. the website uses ASP to process the form,
    and they provide the url you need to post to, plus hidden fields
    you have to put in the form that tell it which account to post to.
    it seems like the easiest solution would be to have two
    actions on the form, but so far that doesn't appear to be possible,
    and i'm just wondering if anyone has done it before and can tell me
    how it's done.
    thanks!

    Would it be out of consideration to hire someone to do this
    for you?
    If not, then you would have to modify the formmail script to
    POST the form's
    data, including the additional values required, to the data
    processing
    script. On reflection, I'm not quite sure what would be the
    best way to do
    that - perhaps use the incoming POSTed data to populate form
    fields and then
    submit the populated form onload.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "n h c" <[email protected]> wrote in message
    news:f4kc9k$dpv$[email protected]..
    > i'm sorry, i should have elaborated a little more.
    >
    > we currently use a formmail.php (the one from
    www.boaddrink.com), and i
    > can
    > definitely edit that (except i don't know enough php to
    figure this out on
    > my
    > own, obviously). but we recently started using a
    web-based lead management
    > program called Top Producer, and that's where the asp
    comes in. we want to
    > keep
    > receiving the email results as we do now, but we also
    want the results to
    > go to
    > Top Producer. so yes, the ideal solution would be to
    tell the formmail.php
    > to
    > also send the results to the Top Producer form
    processor.
    >
    > the url they give for the action is:
    > https://www.topproduceronline.com/LeadToolkit.asp, and
    we also have to add
    > some
    > hidden fields to the form that tell the asp which
    account to post the
    > results
    > to.
    >
    > i hope that helps you understand what i'm trying to do.
    if i need to post
    > anymore info, just let me know. i really appreciate the
    help!
    >

  • How to submit two forms once  in one jsp page?

    hello all,
    My jsp page includes two forms: one form's action is a File Upload servlet, which process file uploading; another is a general servlet to collect user inputs, such as user name, age, etc.
    Because the file upload servlet is a legacy component, and it was used in many applications. we could not meger it into our business components.
    the system requires the file upload and information collection are submitted once. so we have to submit two forms in one 'Submit' action, at the same time, the information collection servlet need get the information from file upload servlet, such as the uploaded file's url.
    I have tried two methods, but all failed
    1. Upload form has no a 'Submit' button, when user click the 'submit' button of the information collection form, we use a javascript to submit upload form first, then submit information collection form. Failed at: the second submit dose wait for upload finishing, then the second submit interrupt the upload
    2. the javascript only submit upload form, and set HTML body's onUnload event to another javascript that submit information collection form. this time, the file upload sucess, and information collection form sucess at most time. But fail when user click the 'refresh' or 'back' or any navigator buttons of the browser. these action will trigger the page 'unload' event too, but the submit if invalid!
    Please tell me how to.

    chain the both requests!
    - build one mutlitpart request and send it to a servlet that can handle that multipart request (think of using oreilly MultiPartParser).
    - check the input (all requiered fields and files there)
    - if yes store the user fields and create a socket connection from your servlet to the legacy file upload servlet and post the file this way.
    - like this you have full control over the users input and can make sure the file and the fields are just save if all requiered elements are availble.

  • How to get HttpServletRequest parameters from two forms in a JSP

    I have this JSP with two forms calling the same servlet. Problem is, when I use a submit button in the second form, I am unable to retrieve the request parameters from the form through the servlet. I am wondering if anybody could give me some info on how to get the request parameters from the second form. I tried to see all the parameter names in the request by calling request.getParameterNames(). But the parameters in the second form are not even seen in the request although I am clicking the submit button in this form!

    First, two forms works fine in one jsp so no need to argue about that.
    Second, did you put the form actions and type ("multipart/formdata " ?) explicit in every form header ? Did you supply different form names ?
    Try to call the submit function through javascript - document.forms[0].submit() for your first, and document.forms[1].submit() for your second form...
    Did you forget to close the form tag by chance ?

  • How can I share data between two forms on different lists

    Using a custom content type, I created two lists that I want to share the same data - one is a calendar.  Our employees complete a form from the "Out of Office Request" list that has workflow functionality that sends an email to that person's
    manager.  If the manager approves the request, the item automatically populates the "Out of Office Calendar."  The problem is that the only information from the request list that populates the calendar is the Title field and date/time fields. 
    I need the manager name in order to create a view for each manager.  
    How can I connect the other information in the request list to the calendar list.  It seems to me that if the title and date fields carry over the information, there should be a way to connect the other information.  I'm using Designer.
    I've tried to connect the two lists' webparts with the wizard, but when I get to the page that maps the two lists, there are no column names and the "Next >" button is grayed out.  This seems like the logical place to connect the two lists,
    but it isn't working.

    Hi,
    According to your post, my understanding is that you wanted share data between two forms on different lists.
    To show external  information on the calendar event, there are two methods: Calculated column, workflow. You can refer to:
    A Simple Guide to Show More Information on a Calendar Event
    I recommend to use workflow to achieve what you want. But you need to create a people column to display the manager.
    You can create a workflow associated to the "Out of Office Request" list, add action to Start Approve Process. If the manager approves the request, you can create a item in the calendar, and then update the people column and the title column.
    Then the calendar will display the Title, date/time and the manager.
    To create a view for each manager, you need to modify the Filter. You can use the people column is equal to the manager name or the Title contains the manager name.
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to submit two forms at same time?

    Have a client that requires their members to update their profile information and some of the details from that form need to also populate a WebApp.
    I've seeded the CRM with basic (first name, last name, email address, Your ID, and EntityID) member data.
    Members would log in and be asked to update their profile. [action="/MemberProcess.aspx"]
    This submission should update their CRM record *AND* create a WepApp record at the same time.
    I tried the AJAX + jQuery method, including the second WebApp form [action="/CustomContentProcess.aspx?...] fields as type="hidden", and using {tag_FIELD NAME}; but this isn't working for me, I'm admittedly not a real programmer.
    Any thoughts? Thank you very much, in advance for any and all help!
    p.s. the reason for wanting to do this, is so that members do not have to update their CRM profile and then also input their data specific to the WebApp form (it's a member listing) as a separate task.
    p.p.s. after I get through the above hurdle... how can I ensure that a CRM user has one and only one WebApp item (their listing) and that they can edit it? Another issue I'm having now is that users create a new listing in the WebApp if they submit another record and in the future I fear that simply editing their CRM profile will create new WebApp listings too. This site is like a phone book, there should only be one listing for each unique email address (in this case).
    -Will

    You can use Jquery + AJAX to submit as many forms as you want to as many places as you want. Don't use the HTML to submit and have a second javascript submitter as the Javascript might not have time to complete before the page is submitted.
    I wrote this quickly just now, this wont work on the JSfiddle site because you can't form POST / GET anything on it (AJAX included it seems). it will submit to other URLs the same data. It is done in parallel and because we don't know which one will finish quicker, both calls check if all calls are complete before confirming everything is complete. I have not tested it but it would get you 99% of the way there.
    <form id="signup_register" action="" method="post">
        Firstname<br/><input type="text" name="firstname"><br/>
        Lastname<br/><input type="text" name="lastname"><br/>
        <button onclick="formsubmit(this);">Save</button>
    </form>
    <script>
        var url1='http://google.com';
        var url2='http://gmail.com';
        var complete1=false;
        var complete2=false;
        FinishedTwoFormSubmits=function(){
            alert('Finished submit - redirect or whatever you need to do.');   
        formsubmit=function(el){
            var data = $('form#signup_register').serializeArray();
            PostSubmit(url1,data, function(){ complete1=true; if (complete1 && complete2){ FinishedTwoFormSubmits() } });
            PostSubmit(url2,data, function(){ complete2=true; if (complete1 && complete2){ FinishedTwoFormSubmits() } });
        PostSubmit=function(url,data,cb){
              var ret=false;
            var noerror=false;
                        $.ajax({
                                    type: 'POST',
                                    url: url,
                                    cache: false,
                                    data: data
                                  }).done(function(msg) {
                                            try{ noerror=true; }
                                            catch(e){ alert(e+'\n\n'+msg); }
                                            if (noerror){ cb() }
                        return ret;
    </script>

  • Preventing user to click on links once form submitted

    Hi All,
    Preventing end user to click on any links once he/she submitted the form until he/she received a response from it.
    I can use filter or shale techniques for this, but it prevents the multiple form submits but not the links.
    (ie, hyperlinks can’t control with the above techniques I suppose.)
    I also used hourglass technique of Javascript. It will show you the hour glass icon once you submitted the form/page.
    Mean while if you mouse over any links on the page (I have other command links on the same page), the hourglass icon showing with hand icon.
    <tr:commandButton provides one attribute blocking=”true”, is not working in this condition.[setting true – blocking user input when the action is initiated and will stop when response received from server.]
    At least if I provide a progress indicator by using <tr:progressIndicator, well enough to the user as some process is going on so that end user can wait for some time.
    I have gone through in detail about it - http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_progressIndicator.html
    Please provide your inputs, how to implement by using <tr:progressIndicator for my <tr:commandButton.
    Or any other fruitful solution for this?
    Thanks in advance :-)

    No idea about the Trinidad component library, but you can also use CSS/JS/DHTML to "freeze" the window during the onsubmit. Add a transparent iframe overlay which covers the whole screen and turn it on during the onsubmit.
    E.g.
    <body>
        <iframe id="freeze" frameborder="0" border="0"></iframe>
        <h:form onsubmit="freeze();">
    iframe#freeze {
        position: absolute;
        visibility: hidden;
        width: 100%;
        height: 100%;
        opacity: 0.0;
        filter: alpha(opacity=0);
    function freeze() {
        document.getElementById('freeze').style.visibility = 'visible';
    }

  • PHP forms submitted as an attachment rather than email?

    How do I get my PHP forms submitted as an attachment rather than email?
    Meaning, if I set up a form on my website and someone completes and submits it, how can I get the responses as an attachment rather than in email text?
    Much appreciated.
    G

    Hi Gunter
    I have spent so much time on this now.
    I have tried to convert the php to an attached .txt or .csv file.
    Learnt a lot but still can not seem to get the form data to be submitted as an attached file.
    Here are two of my attempts, please assist:
    <?php
    $email=$_REQUEST['email'];
    $firstName=$_REQUEST['firstName'];
    $lastName=$_REQUEST['lastName'];
    //The Attachment
    $cr = "\n";
    $data = "Email" . ',' . "First Name" . ',' . "Last Name" . $cr;
    $data .= "$email" . ',' . "$firstName" . ',' . "$lastName" . $cr;
    $fp = fopen('reservationTest.csv','a');
    fwrite($fp,$data);
    fclose($fp);
    // Mail to
    $email = "myemailaddress";
    //subject
    $subject = "Test Budget reservation";
    //Header
    $headers("Content-type: application/octet-stream");
    $headers("Content-Disposition: attachment; filename=reservationTest.csv");
    $headers("Pragma: no-cache");
    $headers("Expires: 0");
    //Message
    $message = "".
    "Email: $email" . "\n" .
    "First Name: $firstName" . "\n" .
    "Last Name: $lastName";
    mail($email, $subject, $message, $headers);
    ?>
    <html>
    <body>
    <table width="400" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>
    <div align="center">Guperman Your Test Message Has Been Submitted</div>
    </td>
    </tr>
    </table>
    </body>
    </html>
    EOD;
    echo "$theResults";
    OR
    <?php
    /* subject and email variables */
    $email = $_POST['email'];
    $lastname = $_POST['lastname'];
    $firstname = $_POST['firstname'];
        $to = 'myemailaddress';
        $emailSubject = 'Test Form';
        $headers = "From: $email\n";
    $message = "A new reservation test.\n
    Last Name</b>: $lastname
    Name</b>: $firstname
    Email</b>: $email
        mail($to,$emailSubject,$headers,$message);
    //open the file and choose the mode
    $fh = fopen("reservationTest.txt", "a");
    fwrite($fh, $email);
    //close the file
    fclose($fh);
    ?>
    <html>
    <body>
    <table width="400" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>
    <div align="center">Guperman Your Test Message Has Been Submitted</div>
    </td>
    </tr>
    </table>
    </body>
    </html>
    On both accounts when I test these files I get the following types of messages.
    Warning:  fopen(reservationTest.csv) [function.fopen]: failed to open stream: Permission denied in \\HOSTING\DFS\20\1\9\1\2028751191\user\sites\mywebsite.com\www\reservationTest.php on line 11
    Warning:  fwrite(): supplied argument is not a valid stream resource in \\HOSTING\DFS\20\1\9\1\2028751191\user\sites\mywebsite.com\www\reservationTest.php on line 12
    Warning:  fclose(): supplied argument is not a valid stream resource in \\HOSTING\DFS\20\1\9\1\2028751191\user\sites\mywebsite.com\www\reservationTest.php on line 13
    Fatal error:  Function name must be a string in \\HOSTING\DFS\20\1\9\1\2028751191\user\sites\mywebsite.com\www\reservationTest.php on line 22
    And then to give the .php files permission I left click on the already uploaded files and try and set the permission to 777, but then I get a response like: Setting Access Properties failed for:
    Your assistance is much appreciated. Regards

  • Two forms at same page

    1st my sincere thanks for all the help and suggestions so far from apex group of friends.
    I have a very critical dilevery to submit by tommorow and i am stucked on this, so please try to help me out with this...
    I have a requirement like to fill up a form and once i click the submit button the fields data will be updated in the database table DIM_INDICATOR whose structure is like this.
    CREATE TABLE  "DIM_INDICATOR"
       (     "DIMENSION_KEY" NUMBER NOT NULL ENABLE,
         "DESCRIPTION" VARCHAR2(2000),
         "INDICATOR_CODE" VARCHAR2(16) NOT NULL ENABLE,
         "INDICATOR_STATUS" VARCHAR2(3),
         "REVISION" VARCHAR2(7),
         "ID" NUMBER,
         "INDICATOR_NAME" VARCHAR2(100) NOT NULL ENABLE,
         "FORMATSTRING" VARCHAR2(20) DEFAULT '999G999G990D99',
         "FORMATSUFFIX" VARCHAR2(1) DEFAULT '%',
         "SCFA_SUBDOMAIN_ID" NUMBER,
         "PLANNED_DELIVERY" VARCHAR2(20),
         "PLANNED_DELIVERY_COMMENT" VARCHAR2(200),
         "QIX_INCLUDE_REQUESTOR" VARCHAR2(100),
         "INDICATOR_NAME_ARB" VARCHAR2(100),
         "DESCRIPTION_ARB" VARCHAR2(2000),
         "UNIT_ENG" VARCHAR2(100),
         "UNIT_ARB" VARCHAR2(100),
         "REMARKS" VARCHAR2(2000),
         "SCFA_DOMAIN_ENG" VARCHAR2(100),
         "SCFA_SUBDOMAIN_ENG" VARCHAR2(100),
         "SCFA_DOMAIN_ARB" VARCHAR2(100),
         "SCFA_SUBDOMAIN_ARB" VARCHAR2(100),
         "CREA_USER" VARCHAR2(30),
         "CREA_DATE" DATE DEFAULT sysdate,
         "MODI_USER" VARCHAR2(30),
         "MODI_DATE" DATE DEFAULT sysdate,
         "AGGREGABLE" VARCHAR2(1) DEFAULT 'N',
         "SORT_ORDER" NUMBER(5,0),
          CONSTRAINT "DIM_INDIC_DIMENSION_KEY_PK" PRIMARY KEY ("DIMENSION_KEY") ENABLE
    ALTER TABLE  "DIM_INDICATOR" ADD CONSTRAINT "DIM_INDICATOR_STATUS_FK" FOREIGN KEY ("INDICATOR_STATUS")
           REFERENCES "VPD"."ADM_INDICATOR_STATUS" ("INDICATOR_STATUS") ENABLE
    CREATE OR REPLACE TRIGGER  "DIM_INDICATOR_BFI"
      before insert or update on dim_indicator 
      for each row
    begin
      IF inserting AND :new.dimension_key IS NULL THEN
        select seq_indicators.nextval into :new.dimension_key from dual;
      :new.id := :new.dimension_key; 
      END IF;
      IF inserting THEN
        :new.crea_user := nvl(v('APP_USER'),USER);
        :new.crea_date := sysdate;
      END IF;
      IF updating THEN
        :new.modi_user := nvl(v('APP_USER'),USER);
        :new.modi_date := sysdate;
      END IF;
    end dim_indicator_bfi;
    ALTER TRIGGER  "DIM_INDICATOR_BFI" ENABLEAt the same time in the same page i have to make a tabular form (We wan to use tablular form here because we will get the functionality of add rows here) which will ask the user to fill the DESCRIPTION_ENG and DESCRIPTION_ENG columns which will update in ADM_INDICATOR_PROVIDER table whose structure is like this.
    CREATE TABLE  "ADM_INDICATOR_PROVIDER"
       (     "INDICATOR_PROVIDER_ID" NUMBER NOT NULL ENABLE,
         "INDICATOR" NUMBER NOT NULL ENABLE,
         "DATA_SOURCE" NUMBER NOT NULL ENABLE,
         "EQUATION_ENG" VARCHAR2(2000),
         "EQUATION_ARB" VARCHAR2(2000),
         "DESCRIPTION_ENG" VARCHAR2(2000),
         "DESCRIPTION_ARB" VARCHAR2(2000),
         "CREA_USER" VARCHAR2(30),
         "CREA_DATE" DATE DEFAULT sysdate,
         "MODI_USER" VARCHAR2(30),
         "MODI_DATE" DATE DEFAULT null,
          CONSTRAINT "ADM_INDICATOR_PROVIDER_PK" PRIMARY KEY ("INDICATOR_PROVIDER_ID") ENABLE,
          CONSTRAINT "ADM_INDICATOR_PROVIDER_UQ" UNIQUE ("INDICATOR", "DATA_SOURCE") ENABLE
    ALTER TABLE  "ADM_INDICATOR_PROVIDER" ADD CONSTRAINT "ADM_INDICATOR_PROVIDER_IND_FK" FOREIGN KEY ("INDICATOR")
           REFERENCES "DWH"."DIM_INDICATOR" ("DIMENSION_KEY") ENABLE
    ALTER TABLE  "ADM_INDICATOR_PROVIDER" ADD CONSTRAINT "ADM_INDICATOR_PROVIDER_PROV_FK" FOREIGN KEY ("DATA_SOURCE")
           REFERENCES "DWH"."DIM_DATA_SOURCE" ("DIMENSION_KEY") ENABLE
    CREATE OR REPLACE TRIGGER  "ADM_INDICATOR_PROVIDER_TRG"
    BEFORE INSERT OR UPDATE  ON adm_indicator_provider
    FOR EACH ROW
    BEGIN
      IF inserting AND :new.indicator_provider_id IS NULL THEN
        SELECT adm_indicator_provider_seq.nextval
        INTO :new.indicator_provider_id
        FROM dual;
      END IF;
      IF inserting THEN
        :new.crea_user := nvl(v('USER'),USER);
        :new.crea_date := sysdate;
      END IF;
      IF updating THEN
        :new.modi_user := nvl(v('USER'),USER);
        :new.modi_date := sysdate;
      END IF;
    END;
    ALTER TRIGGER  "ADM_INDICATOR_PROVIDER_TRG" ENABLE
    /NOTE : Here the DIMENSION_KEY column of DIM_INDICATOR is same as INDICATOR column of ADM_INDICATOR_PROVIDER
    So at the same page i have to show two forms,1st for dim_indicator table and other is for adm_indicator_provider table. Once the user clicks the submit button my procedure should check that 1st form is filled and ask him to fill the fields of 2nd form before updating in both the tables.(dim_indicator and adm_indicator_provider)
    I know its a big one favor i am asking for...but i am really looking for a kind reply from someone who could help me out to achieve it for sure
    Regards
    Adi

    Hello,
    I don’t think you’ll be able to find a simple wizard solution for your restrictions, especially not using tabular forms. One reason is that when you add rows to the tabular form you actually submitting the page. Any validation errors in the first table will reset all the updated/new information on the tabular form, and in case of more than one description to a single indicator you might create temporary inconsistency in your database, that might not be acceptable by your application logic restrictions, not to mention potential problems in multi-user environment.
    You should design your form manually, and consider using a view that reflects both your tables. For the long run, it will probably take you less time than forcing the wizards to do what you want (if it's even possible).
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Forthcoming book about APEX: Oracle Application Express 3.2 – The Essentials and More

  • Two forms on checkout registration page?

    Hi all,
    Is this scenario for checkout possible? I've been trying to implement it but keep running into issues.
    - Login field to check out as a member, check outfields are prefilled. If you check out as a member you will not be subscribed to a secure zone (this is the main reason for having two forms. I don't want people who already have a membership to get a redundant password reminder.)
    - Check out as non-member, subscribe to a secure zone - otherwise all is the same as the member form.
    The only way I can see to do this is to have two forms on checkout and show one based on logged in/logged out criteria, and this is no problem to implement. What is a problem is that the Amount field on one of the forms just won't populate - it's completely blank. If I delete one of the forms from the page, it begins to work again without a hitch.
    So I can't help thinking I'm taking the wrong approach and I just have to deal with a redundant membership details email. Or, is something going on that I'm not seeing? Any help is very very much appreciated.

    Thanks, Liam.
    The second part of your answer doesn't really hold true though. If you have a password field and have the form set to subscribe people to a secure zone on log out, it will ALWAYS send users an email giving them their username and password, and telling them what zone they're subscribed to. I understand it doesn't resubscribe them...but I want to supress this behaviour - it is undesirable. In a nutshell:
    I have two secure zones - one members (paid subscription), one general (bought something online).
    If they are a member of neither, I want them to get a general subscription on checkout.
    If they are a member, I don't want to subscribe them to anything.
    Even if i HAVE to subscribe them to the general secure zone, I'd love it if they wouldn't get notification of this.
    As far as I can tell, this scenario is not possible with your answer above.

  • AJAX Multiple Form Submitted with Attachments.

    Hi Everyone and Anyone
    I have an issue with a form when using ajax I cannot get the File Attachment to upload.
    <tr>
    <td><label for="FileAttachment">Attach File (250Mb Limit)</label><br />
    <input type="file" name="FileAttachment" id="FileAttachment" class="cat_textbox" /></td>
    </tr>
    Well that is not exactly true but if I use the standard BC form FormProcessV2 with ajax it is a no files upload.
    But if I put this little bit of code in the form validation ( if (theForm.FileAttachment) theForm.FileAttachment.value = theForm.FileAttachment.value )then the files upload correctly ONLY I get redirect to a page with this:
    {"FormProcessV2Response": { "success": true, "entityId": "28589333", "objectTypeId": "Cases", "objectId": "4686492", "message": "<table class=\"tabledefault\"><tr><td id=\"title\"><strong>Summary of web form submission:<\/strong><br\/><!-- IP Address: 27.252.113.60 --><\/td><\/tr><tr><td id=\"name\"><strong>Your Name<\/strong><br\/>Daniel Telfer<\/td><\/tr><tr><td id=\"email\"><strong>Email Address<\/strong><br\/><a href=\"mailto:[email protected]\">dtug.co.nz<\/a><\/td><\/tr><tr><td id=\"casenumber\"><strong>Case Number<\/strong><br\/>4682<\/td><\/tr><tr><td><strong>Attachment<\/strong><br\/>People .pdf (31.06kb)<\/td> .........Deleted..............<\/tr><\/table><\/td><\/tr><tr><td id=\"innerform_95487\"><table class=\"tabledefault\"><tr><td id=\"CAT_Custom_293_957\"><strong>Upload your CV<\/strong><br \/><\/td><\/tr><\/table><\/td><\/tr><\/table>" }}
    I can also do this and ( if (theForm.FileAttachment) theForm.FileAttachment.value = theForm.CAT_Custom_264793_95487.value; ) which I would like to do but also gives the above error. Even though when I go to the case the file are there.
    I need to do this because the client wants to be able to click on these files and open them and the extend CRM database field just give a part url and the client has issues with this when they want to view the files (having to copy and paste it into the url especially when the url is incorrect as bc alters this in the CRM page without being in edit mode. PLEASE ADD THIS ADOBE! a FILE LINK so it is the same a the case related files.
    I also want to do this because I want all the customer details on the same page and so need to use ajax to submit two forms at the same time which works as long as I do not upload a file, one way works but I get an error and the other the files do not upload and no error. ABODE PLEASE CASES FOR USER DETAILS FORM WOULD BE GREAT ie. name, username, password etc.
    I am trying to keep things as simple as possible for the client and customers. I am so close but so far away.
    1) Does anyone else know if ajax should submit the images automatically or is there some addition code necessary?
    2) Does anyone know why my validation code works but gets an error in ProcessFormV2.aspx (except that it is a hack as I know this)?
    3) Am I going about this completely the wrong and there is a better way.
    Any HELP! would be great? 

    Thanks Liam
    I will have to do this another way.
    It is so close to working it is frustrating. Place this if (theForm.FileAttachment) theForm.FileAttachment.value = theForm.FileAttachment.value  in the form validation and the form fields and files get uploaded you just get redirected to a page with formResponse HTML. But like you say not supported. So another way then.
    BC any chance you can support this, it would be handy.
    Cheers Daniel

  • Two Forms

    Hope you all had a lovely xmas!
    I have a quick question. I am using two forms;
    Form A
    <h:form id="formA">
         <h:outputLabel for="tel" value="Telephone">
          </h:outputLabel>
             <h:inputText id="tel" value="#{bean.tel}" required="true"  label="Telephone" size="20" maxlength="30">
    </h:inputText>
    Form B
    <h:form id="formB">
         <h:outputLabel for="tel" value="Telephone">
          </h:outputLabel>
             <h:inputText id="tel" value="#{bean.tel}" required="true"  label="Telephone" size="20" maxlength="30">
    <h:commandButton value="Submit" action="submit"/>
    </h:inputText>My question is, is it possible to use the submit button on FormB to submit both forms?

    That's two requests. You'll have to let the one form open in a new window. You can use the target attribute for that. Then just submit it using Javascript.
    That can result in bad user experience though. Why can't you use one form for that?

  • Two form/ invoke 2 seperate urls?

    Hi All,
    I have following Jsp page:
    My requirement is:  Page has  a single  submit button and two  <FORM> tags. Each form tag has a Url   to invoke on  Submit button pressed. 
    Meaning  if  usedr selects   SIT1  radio button and  presses  Submit    then      the  browser should display  indexBM.jsp  page
    If   user  selects    SIT2    radio  button  and  presses  Submit,  then   browser  should  display   indexComp.jsp    page.
    Following is not working.   What changes I need to do to achieve above?
    thanks
    <%@ include file="header.jsp" %>
    <html>
      <body>
         <tr><td><b><center>BEST MATCH and CRES(Customer Related Enterprise Services)</td></tr>
    <form>
        <form method="post" action="indexBM.jsp">
          <table width="700" Align="center">
            <!--DWLayoutTable-->
              <tr></tr>
              <tr></tr>
              <tr></tr>
              <tr></tr>
              <tr></tr>
              <tr></tr>
              <tr>
                   <td></td>
                   <td><B><I>Service Type</I></B></td>
                   <td><input type="radio" name="env_Type" value="SIT1" >Best Match</td>
              </tr>
              <tr>
                   <td></td>
                   <td></td>
              </tr>
                   </table>
        </form>
           <form method="post" action="indexComp.jsp">
          <table width="700" Align="center">
              <tr>
                   <td></td>
                   <td></td>
                   <td><input type="radio" name="env_Type" value="SIT2" >CRES(Customer Related Enterprise Services)</td>
              </tr>
              <tr>
                   <td></td>
                   <td></td>
              </tr>
                   </table>
        </form>
              <tr>
                   <BR>
                   <P></P>
              </tr>
              <tr>
                   <td width="40"></td>
                   <td></td>
                   <td colspan=3>
                <input type="submit" name="submit" value="SUBMIT">
              </td>
              <td></td>
            </tr>
          </table>
        </form>
      </body>
    </html>

    ok so what changes do i need to do in my existing code.. I cannot keep two buttons in that Jsp page. I can keep only one button, two radio buttons for selection, and then depending on radio button selection a forward to appropriate Jsp page either indexBM.jsp OR indexComp.jsp.
    thanks

Maybe you are looking for