Using JavaScript to submit a form with multiple submit buttons

I am a newbie to JavaScript, so hopefully someone can answer
this for me.
On my user registration form, I have two buttons that submit
the form, 'check_availability' (to check if the username is
available) and 'register'. In my PHP script, I check which button
was pushed by checking which POST value is set,
$_POST['check_availability'] or $_POST['register'].
If I set the 'register' button to a JavaScript function that
validates the form and then submits it, how do I get my PHP script
to think 'register' was pushed?

Sorry I used my old captcha script there.
[php]
<?
session_start();
if(isset($_POST['button_name'])){
//DO SOMETHING HERE
} else {
//Add the page data
?>
[/php]
"east99" <[email protected]> wrote in
message
news:fepqr8$2mr$[email protected]..
> Firstly name your buttons then use this script:
>
> [php]
> <?
> session_start();
> if(isset($_POST['button_name'])){
> if ($_POST['vercode'] != $_SESSION['vercode'] OR
$_SESSION['vercode']=='')
> {
> // echo '<strong>Error
Message</strong><br>';
> $error = '<strong><font
color="#FF0000">Error
> Message</font></strong><br>';
> } else {
>
> //Add the page data
>
> }
> ?>
> [/php]
>
>
>
> "AngryCloud" <[email protected]> wrote
in message
> news:fecu6r$cl5$[email protected]..
>>I am a newbie to JavaScript, so hopefully someone can
answer this for me.
>>
>> On my user registration form, I have two buttons
that submit the form,
>> 'check_availability' (to check if the username is
available) and
>> 'register'. In
>> my PHP script, I check which button was pushed by
checking which POST
>> value is
>> set, $_POST['check_availability'] or
$_POST['register'].
>>
>> If I set the 'register' button to a JavaScript
function that validates
>> the
>> form and then submits it, how do I get my PHP script
to think 'register'
>> was
>> pushed?
>>
>
>

Similar Messages

  • How to distribute a form with multiple submit buttons?

    I have a form that has multiple submit buttons depending on the information that is being entered and then who the information should go to.  When I try to disbribute the form, I get an error message stating the following, "Acrobat is unable to distribute this form because it contains multiple submit buttons with different formats or return URLs."  Is anyone able to let me know how I can distribute the form?

    Sounds as if you need your own web script to process submissions - written by an experienced web programmer (I very strongly recommend someone familiar with all the latest security weaknesses, and not a project for anyone else). Your needs are (it seems to me) too complex for Adobe's automatic system.

  • Submitting multiple forms with one Submit button?

    I'm working to create a web app for the iphone and am using
    an apple developed css within an html page. In doing so I have
    created three forms within the single page and would like to submit
    them simultaneously with one submit. I've looked and tried a few
    javascripts but nothing has worked thus far. All three forms call
    the same action (php).
    Is this possible using js or another function?

    .oO(iRyFlash)
    >I'm working to create a web app for the iphone and am
    using an apple developed
    >css within an html page. In doing so I have created three
    forms within the
    >single page and would like to submit them simultaneously
    with one submit. I've
    >looked and tried a few javascripts but nothing has worked
    thus far. All three
    >forms call the same action (php).
    >
    > Is this possible using js or another function?
    Make it a single form.
    Micha

  • Can't submit form with multiple signatures

    I have a form with multiple signatures. I've enabled Reader Rights. After the first signature signs, the user must save the document. When the document is saved, then the user cannot submit the form to the next signer. Is there a way to change how this is working?
    Thanks,
    MDawn

    MDawn
    Did you design the form with Adobe Designer?  Assuming you did, when you add a signature field, there is a property enabled by default that "Locks all fields" after signing.  A submit button is also considered a field so it will be locked after the first signature is applied.
    You need to either disable this property (I would not recommend this) or create field collections that are assigned to specific signature fields.  A field collection controls which fields are locked by each signature field when signed.
    Regards
    Steve

  • Is it possible to create a form with multiple form fields on a single line?

    Is it possible to create a form with multiple form fields on a single line?  I can't find anything in the documentation or a template that does this.
    I am trying to create a "documents received" checklist with a check box on the left margin, a date-received field to the right of the check box and and a description of the document (Formatted Text) on the far right.
    In the past I have entered the Fixed Text with a word processor, published it to a PDF file, then added the check box and date fields with the Acrobat Forms editor.  I would prefer to use FormsCentral if it is possible.

    We now support multiple fields on one line. This post provides a brief overview.
    Give it a try and send us your feedback.
    Sorry it took so long.
    Randy

  • How to build a form with multiple tables in oracle application express

    Hi everyone,
    I have got problem in building a form with multiple tables.I have a main table with (20) columns and this main table is related to the other tables with the primary key-foreign key relation ship.My requirement is i have to build a form which has fields from many tables and all the fields are related to the main table using (ID) column.In that form if i enter ID field i have to get information from differnt tables.
    Please help me to solve this (building a form with mutiple tables)
    Thank you
    sans

    Sans,
    I am no Apex expert, but with a situation as "complex" as yours, have you thought about creating a VIEW that joins these 7/8 tables, placing an INSTEAD OF trigger on that view to do all the business logic in the database, and base your application on the view?
    This is the "thick-database" approach that has been gaining momentum of late. The idea is to put your business logic in the database wherever possible, and let the application (Form, Apex, J2EE, whatever) concentrate on UI issues,

  • Rearrange pages when printing adobe form with multiple master pages

    Hello!
    Good day to you all.
    I have an issue in regards with printing my adobe form with multiple Master pages. I have 4 master pages:
    1st master page: a
    2nd master page: b
    3rd master page: c
    4th master page: d
    all with different headers and footers all having the same contents (items). I don't have issue with one page content (it just prints 4 pages with different headers and footers). The issue comes out once the items exceed 1 page.
    What happens is that the preview/print shows (example: 3-page item)
    a1-a2-a3-b1-b2-b3-c1-c2-c3-d1-d2-d3.
    What i need is to print these such that all 1st pages of the 4 master page to be printed first, then all the 2nd pages, then all 3rd pages. Please see below:
    a1-b1-c1-d1-a2-b2-c2-d2-a3-b3-c3-d3
    This is because we will be using carbonless copy paper during printing and it's possible that it would be printed on batch jobs. Please suggest ways to do this.
    Thanks a lot in advance!
    Best Regards,
    abap_peer_dangs

    Hi,
    Is that requirement of multiple pages as groups only at the time of print or at print preview also...?
    Can you have a Print button on this screen or you should be using the Abobe toolbar's Print button..?
    Well if this on a click of a button in the form and the requirement is only at the time of print and not on print prieview I can have a JS script which does this...
    Let me know if this suffice, I can try with a local file and send you the script.
    @ Chris: I didn't understand what do you mean by reported, I was eager to hear and learn a solution from you may be a new approach which I am not aware of ...?
    Cheers,
    Sai.

  • Best Solution for Creating an Onlne Purchase order form with multiple calculation fields

    I am a bit confused.  Our school has a Forms Central account which works great for our registration forms but I need to find a solution for creating an online purchase form with multiple calculation fields - I know that forms central does not support calculation fields (too bad) but I know that Acrobat Pro does... soooo...
    Can you create the forms in Acrobat and then somehow integrate the advanced features into forms central?  Do they talk to each other?  Is this easy to do? .... I guess another way to putting it is can you create the forms in Acrobat including all of the advanced features for payment calculation and then host it online using Forms Central to manage and collect the data? (I guess that really is my question)
    Thanks (how does this compare to a solution like Formstack?)

    Hi, thanks.
    The naming convention was the consistant up until a point when I read that you need a '.' syntax (?!) - does anyone know if this is true?
    Attached is a version with Bernd Alheit's suggestion and with all the naming of the fields being consistant. It's still not working for me though after doing this and I'm stuck as to why, because I think it should work. I've also tried writing the calcualting line of code in the same manner that Bernd Alheit suggests before I came on here, and it wouldn't work then.
    As with any coding, it must be something to which I have done, but I can't see it anywhere
    Any ideas? Thanks for helping me
    Cheers

  • How to design a form with multiple lang(Arabic and Eng) in a page

    Hi All,
    Could you pls help me how to design a form with multiple languages. when I set the form proprties-->Form Locale as Arabic. English text is comming in reverse and when set the FormLocale as English, Arabic text is comming in revese.
    Pls help me how to design
    Thanks in advance.
    Regards,
    Jayakar

    I am not sure how you can have two different languages inside the same PDF.
    Alternatively, if you want to place only the static labels, you can convert all the static label in one language to images and set the form language setting to other. And place the images inside the form using Image field. For example, you can keep the form language as English and then convert all the arabic language labels/ Static text to images.
    Anotherway,
         Have same sections in both the languages and hide and unhide based on the user selection of the language..
         if your user chooses Arabic, then you can unhide the Arabic sections and change the form language properties programmatically..
    Thanks
    Srini

  • How to design a form with multiple lang(Arabic and Eng) in a pge

    Hi All,
    Could you pls help me how to design a form with multiple languages. when I set the form proprties-->Form Locale as Arabic. English text is comming in reverse and when set the FormLocale as English, Arabic text is comming in revese.
    Pls help me how to design
    Thanks in advance.
    Regards,
    Jayakar

    I am not sure how you can have two different languages inside the same PDF.
    Alternatively, if you want to place only the static labels, you can convert all the static label in one language to images and set the form language setting to other. And place the images inside the form using Image field. For example, you can keep the form language as English and then convert all the arabic language labels/ Static text to images.
    Anotherway,
         Have same sections in both the languages and hide and unhide based on the user selection of the language..
         if your user chooses Arabic, then you can unhide the Arabic sections and change the form language properties programmatically..
    Thanks
    Srini

  • Using javascript:SP.UI.ModalDialog.showModalDialog with Workflow Initiation

    I'm trying to use "javascript:SP.UI.ModalDialog.showModalDialog" with a workflow initiation page.  I can get it to start but the "Cancel" Button doesn't work.  Can anyone give me a clue?
    javascript:SP.UI.ModalDialog.showModalDialog({url:"{SiteUrl}/Workflows/Assign%20Corrective%20Action/Assign%20Corrective%20Action.aspx?List={ListId}&ID={ItemId}&Source={Source}",title:"Custom Form"});return false;
    David Jenkins

    Hi David,
    To reproduce this issue, Could you give me your detailed process and code?
    In addition, for the 'Cancel' and 'Start' buttons, if you want to reture to the original page after clicking, you can open the custom workflow and create a rule and add a 'Close the form' action for the two button.
    Here is an article about starting a workflow with a initiated parameters through JavaScript, please take a look at:
    http://www.sharepointblogs.be/blogs/timmy/archive/2011/09/15/starting-a-workflow-with-a-initiated-parameters-through-javascript.aspx
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Create master document form with multiple sub form

    Hi Dear;
    how can i create a master form with multiple sub form using screen painter?
    best regards;

    Hi Dany,
    Do you mean a form connected to a MasterData Object with multiple childs?
    If so:
    1. Create a new ScreenPainter form;
    2. Add a Folder item for each of the childs;
    3. Add a new matrix to each of the childs and change their PaneLevel to from 1 to N (N = number of childs you have);
    If your code you then need to catch item pressed event for the Folder Items and change the form's Pane Level accordingly.
    Regards,
    Vítor Vieira

  • I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. How can I fix this?

    I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. Can I fix this?

    I'm fairly new to this, but I think it has to do with the way you have the drop downs named. Did you copy one then keep pasting it in each field? If so, that is the problem. You should rename each one with a different number: Dropdown1, Dropdown2, etc. I think that might solve the issue.

  • Form with HTTP Submit.. Do I need a Guided Procedure ? How to Configure it?

    Hi masters.
    I have a adobe interactive form with HTTP submit, it works when it runs online, but when I save the pdf file, open, fill and submit, the server does not recieve any request.
    I have read a lot of tutoriais but I still haven´t find a specific tutorial from the begin to the end of this process.
    Should I create a Guided Procedure to recieve this form from http submit ? How can I create it ?
    NetWeaver CE

    Regardless of whether this bar is displayed or not, you should be able to access what is in the "Favourites" folder in a few ways.
    Firstly via the Bookmarks link in Safari. This is the first icon directly to the right of the address bar. Pressing this will open your Bookmarks menu. If you see the word Bookmarks in blue select this and it will take you to the main bookmarks page, and the word Bookmarks will appear in black bold text. If you see Bookmarks in black bold text when first clicking Bookmarks you are where you need to be. The first link on here will be Favourites and have a star icon right next to it, click on Favourites and you will see what has been added to your Favourites folder - if anything.  Also there is an Edit button in the bottom right of this screen, if you aren't going where you expected when selecting a URL in here press Edit, press the > arrow to the right of the favourite name, is the URL correct? If not change it, and click DONE on the keyboard - appears where Return key normally shows on the right-hand side.
    If you are opening Safari and have no tabs already open or have already closed pages so none are open you will see icons that represent the contents of your Favourites folder displayed at the top of the page.
    Also with a page loaded if you click in to the URL field then you will see these icons appear again, together with the keyboard at the bottom of the page.
    Hope this helps.
    Steve

  • Fillable form with multiple pages

    I have a fillable form with multiple pages. However, when I save it and open it, it tabs to the end of the first page and will go back up to the top of the first page again. It won't tab to the second page. Instead, the user will have to click there cursor into the first field of the second page, tab through that, and repeat this process from page to page. If the person doesn't know there are multiple pages, they may believe they have finished the form once they get to the bottom of the first page, hit tab, and it takes them back up to the first field on the first page again. How can I make it go from the last field on the first page, tab, and first field on the second page?

    Thanks for the reply. Since my post to this topic I discovered some things about tabbing. With out adding another master page but just keeping the one and making sure that it's occurance is set to a minimum of one and including master page in the numbering it will work as long as the order of fields in the hierarchy tab matches the order in the position of the fields.
    I have a subForm that has a row of fields starting with a button then several text fields. I couldn't tab to the next page because the button was at the bottom of the hierarchy and it wasn't until I moved it to the top that I could finally tab to the next field on the next page. I also discovered that with a one page dynamic interactive form that has some expand able text fields in it and when the field expands so that any fields are pushed to a new second page tabbing seems to not work. In other words when I tab out of that field that is suppose to expand and a new page is added to the form the tabbing quits and in order for it to resume I have to click in a field and from then on it work even if it gets to where a third page and so forth is added. It is just when a one page (in my case) form turns into multiple pages for the first time.
    Hope that makes sense.

Maybe you are looking for

  • Mismatiching the Data in Reporting level.

    Hi Every One, I have ODS like ZMP_REL,THIS ODS FETCHING THE DATA FROM R/3 SIDE.AFTER GETTING THE DATA ,WHEN WE DESIGN A REPORT ON THIS ODS, IN REPORT THE DATA WILL BE MISMATCHED. EXAMPLE LIKE: I HAVE OBJECT LIKE:  ZADD1                               

  • Itunes 11.4 freezing when ipod touch 5 connected to windows 7 64bit

    Every time the iPod touch 5th generation is connected to ITunes in Windows 7 64 bit, the stupid iTunes freezes. The only way to unfreeze is to disconnect it. This problem has been going for a very long time. Upgrading iTunes does nothing. ITunes 11.4

  • Exporting WEBI to Excel - Dropping Header Section entirely

    When I am saving a BIR2 WEBI report to Excel it  drops the entire header section and just saves the detail.  Does anyone have any ideas?

  • Generating JavaHelp (online help) in Arabic Language

    Dear Friends, I would like to know from you that I want to generate JavaHelp (online help) in Arabic Language. Could you please suggest me which tool will generate Javahelp in Arabic? Thanks & Regards, T. BALAJI Sr. Tech. Writer

  • How to hire applicant as employee

    This may sound simple but I am struggling a little bit. ( Unfortunately working as a tech support guy means very limited knowledge of functional steps.) I have created an applicant (on a test system) and trying to hire that person as employee, how do