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 8830525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:06:46+00:00 2026-06-14T08:06:46+00:00

In a HTML form, how can I get two names from one input field?

  • 0

In a HTML form, how can I get two names from one input field? Is it possible through hidden input fields? And how?
I tried to make the hidden field value dynamically equal to the non-hidden one (so that they will be equal no matter what the user writes), but I’m sure just that it doesn’t work, not whether something like this would work. Here was suggested that something similar should be possible.
My problem should be in the value attribute – I tried different values, but I didn’t manage to bind it to the foo value.

<input name="foo" id="foo" type="text" value="foobar" />
<input type="hidden" name="bar" id="bar" value=foo />

I would prefer to solve it without Java Script.

I’d like to use both attributes for different websites, which use different names for the same property (the same for our purpose, the role is slightly different, but format and value is the same).

  • 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-14T08:06:47+00:00Added an answer on June 14, 2026 at 8:06 am

    It is not possible without JavaScript. Hidden input fields are just static data, as far as HTML is concerned; they are not affected by user input in any way. Similarly, when user input changes the value of a field, there is no way in HTML to specify that this would also change another field.

    The statement “I’d like to use both attributes for different websites, which use different names for the same property” seems to suggest that the form data is to be submitted to one of two or more servers depending on something. Although this is technically possible without JavaScript if certain HTML5 features are used, their browser support is limited. The feasible options are: 1) Use different forms, 2) Use JavaScript, 3) Use a simple server-side mediator that passes the data forward to one or more server-side handlers depending on some field(s) in the data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an html form with two input fields, in first one user puts
How can I hide an HTML form legend from visual browsers, using CSS, in
How can I the HTML string <br> from this HTML FORM pass to the
I have several sites where users can send me email through an html form
I have following HTML with two elements having the same name <input type=hidden name=
I'm trying to copy one form <input> field value to another form using jQuery.
$('#submit').click(function () { //Get the data from all the fields var name = $('input[name=name]');
I need to take a .csv file from an HTML form and parse through
How can I get the value of an HTML form to pass to JavaScript?
So I am trying to use a simple form to get input from 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.