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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:05:09+00:00 2026-05-31T12:05:09+00:00

I have a form with a unique identifier field that the user needs to

  • 0

I have a form with a unique identifier field that the user needs to enter, when passing this value it needs to appear in different field id. so for instance. the field that user enters the unique code in is called “unique” and the copy needs to be in “message”, how can i achieve that?

<div data-role="fieldcontain">
                        <label for="pins" id="pinLabel"><span style="color:#f22300">*</span>&nbsp;Unique Code:</label>
                        <input data-mini="true" name="pins_r" id="pins" placeholder="9 alphanumeric characters"/>
                    </div>
                    <input type="hidden" id="msg" name="msg" value=pins>

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-05-31T12:05:10+00:00Added an answer on May 31, 2026 at 12:05 pm

    There are two ways to do this with JavaScript.

    Method 1)

    Have an onchange event on the unique field such that whenever the value is changed, change it in a hidden field called message.

    <input type="text" id="unique" name="unique" onchange="setMessage(this);">
    <input type="hidden" id="message" name="message">
    
    function setMessage(field) {
        document.getElementById('message').value = field.value;
    }
    

    Method 2)

    Use ajax to post the form instead, that way you can build the fields yourself.

    ie. post message= document.getElementById(‘unique’).value

    Both the above are greatly improved if you use JQuery or another JS helper framework.

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

Sidebar

Related Questions

I have a form with an input field where a user enters a unique
I have a form that looks similar to this - <Form (Unique Form ID)
I have form where user submits field. Field can have letters, numbers, and punctuation.
I currently have form that checks if a user has unsubmitted changes when they
I have an entity that has three fields that need to form a unique
I have a form where users can enter tags like tag1,tag2,tag3. I explode that
I have a form that a user fills out, which submits information to my
I have a form that searches a mysql db for whatever the user is
The basic idea is this: I have a form that generates form fields dynamically
I have a form with field names that are generated dynamically by server side

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.