www.webdeveloper.com
Results 1 to 3 of 3

Thread: Merging the Content of 3 Fields Before Form Submission

Hybrid View

  1. #1
    Join Date
    Jan 2014
    Posts
    7

    Merging the Content of 3 Fields Before Form Submission

    Hi.

    I have a form with a series of text fields.

    3 of them have to be combined into a hidden field before submission.

    I have found http://jsfiddle.net/Tyriar/5ERRG/ a few hours ago and I am trying to adapt it to a form.

    The <div id="output"></div> would be the hidden input.

    And <button id="test">Test</button> would be replaced by the submit button.

    In the first place, after editing the code and changing <div id="output"></div> for <input id="output"/> the fourth field does not receive any content from the 3 fields above, so I have no tested it in a form.

    Some idea on how to adapt the code to my project?

    If such a thing is possible.

    In other case, I would appreciate some other way to do it.

    Thanks for your help.

    Best regards.

  2. #2
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,123
    You can't set the innerHTML of an input. You have to set the value. See here:
    http://jsfiddle.net/5ERRG/12/
    I'm always up for networking with fellow web professionals. Connect with me on LinkedIn if you like!

  3. #3
    Join Date
    Jan 2014
    Posts
    7
    I see.

    Thanks. I'll try with it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles