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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:14:34+00:00 2026-06-13T00:14:34+00:00

I have some html that looks as so: <h3 class=basic left-top-border-radius>Basic<br /> 500<span>$25</span></h3> <a

  • 0

I have some html that looks as so:

<h3 class="basic left-top-border-radius">Basic<br /> 500<span>$25</span></h3>
    <a class="signup colorbox" href="#text-signup-form">More Info</a>

When More Info is clicked a lightbox pops up with a simple info request form. Here is my problem. I would like when the link is clicked to have the text of the h3 header passed to a form input field that is hidden so I know which plan they clicked on for more info.

The input looks like so:

<input type="text" class="cat_textbox" id="CAT_Custom_440761" name="CAT_Custom_440761" maxlength="1024" />

How would I do this using jQuery? (I thought of using jQuery .text() method but I read that does not work with forms and I do not know how to pass the h3 text anyway.

NOTE There are multiple h3 elements on the page.

  • 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-13T00:14:37+00:00Added an answer on June 13, 2026 at 12:14 am

    You can do the following with this code.

    $('.signup').click(function(){
        var planTitle = $('h3').text();
    
        $('#CAT_Custom_440761').val(planTitle);
    });
    

    As you click on the button it will search for the h3 tag (would be better to attach an ID to the h3 tags) grab the text of that element and insert it into the value of the input field.

    If you aren’t able to attach an ID to the h3 tag you can search for the prev instance of h3 and take the text from that.

    $('.signup').click(function(){
        var planTitle = $(this).prev('h3').text();
    
        $('#CAT_Custom_440761').val(planTitle);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have some html that looks like the following: <div class='something unknown' id='something_unknown_1'>
I have some HTML that looks like this: <div> <div class=value> <a href=# class=clicker>Some
I have some HTML that looks like this: <div class=product> Content In Here <div
I have some HTML that looks like this: <div class=MyClass></div> <div class=MyClass></div> <div class=MyClass></div>
I have some HTML that looks like this: <h2>Heading</h2> <div class='myClass'> <h2>Another Heading</h2> </div>
If I have some HTML that looks like this: <div id=text> This is some
I have HTML that looks like this: <div class=item-list> <h3>Monday Sep 21</h3> <h3>Tuesday Sep
I have some html in this format: <ul id=foo> <li class=bar><a href=#>Reports</a> <span> <a
I have some HTML that is being produced by a WordPress plugin that is
I have some HTML that I need to toggle between two structures - one

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.