Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8198529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:58:15+00:00 2026-06-07T05:58:15+00:00

I have a form where I want the user to choose 2 different way

  • 0

I have a form where I want the user to choose 2 different way to checkout :

Let say that the user enters his informations like his address, name and credit info.
Using Paypal Pro, at the end, I want him to be able to choose whether or not he wants to checkout through paypal or through direct payment … that would lead to a second form.

By the way, with CodeIgnieter, when following a form with another one, I got the validation process of the second one that always run, I mean when I come from the first form to the second one, in the second form I will see my error messages appears, for each field even if the user didn’t try to submit yet. Is there a way to avoid this bug ?

Thanks !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:58:16+00:00Added an answer on June 7, 2026 at 5:58 am

    Edited: see end of the answer

    You should do it as you would normally:

    View:

    <form method="post" action="mysite.com/submit">
        <input type="text" name="name1">
        <input type="text" name="name2">
        <input type="text" name="name3">
    
        <input type="submit" name="sbm" value="Direct">
        <input type="submit" name="sbm" value="PayPal">
    </form>
    

    In PHP (controller probably):

    if($this->input->post('sbm') == "PayPal") { 
        // do something with PayPal
    } else {
        // do something with direct payment
    }
    

    Edited: If you would like the caption of the button (visible text) to differ from the value, use <button> element instead of the <input type="submit">:

    <button name="payment_type" value="paypal" type="submit">I want to pay with PayPal</button>
    <button name="payment_type" value="direct" type="submit">Or should I go with Direct Payment?</button>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's what I want to do. I have a form that the user fills
I have a form. Once the form is filled I don't want the user
I want to have a form on my page take user input, a URL
I have a form. When the user clicks disable I want to disable all
I have a form, when user submit the form, I want to direct the
In my web application i have registration form, when user register i want to
I want to make a user-registration form where I will have fields such first
I want to have multiple multiple choices given to user after the form submit
I want to modify a form using javascript (after a user must have clicked
I have a page that allows a user to choose some things in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.