Title: Adding Tool tip using java get content from another div for input fields
Last modified: September 2, 2018

---

# Adding Tool tip using java get content from another div for input fields

 *  Resolved [smohannagaraj](https://wordpress.org/support/users/smohannagaraj/)
 * (@smohannagaraj)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/adding-tool-tip-using-java-get-content-from-another-div-for-input-fields/)
 *     ```
       <div class="wpuf-label">
            <label for="post_title">Title <span class="required">*</span></label>
       </div>
   
       <div class="wpuf-fields">
             <input class="textfield wpuf_post_title_741" id="post_title_741" type="text" data-required="yes" data-type="text" name="post_title" placeholder="" value="" size="40">
       ```
   
 * This is the code on my form. I want to add a attribute data-tip to div-wpuf-fields.
 * Please help me. Thanking You.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Mehedi Hasan](https://wordpress.org/support/users/thebengalboy/)
 * (@thebengalboy)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/adding-tool-tip-using-java-get-content-from-another-div-for-input-fields/#post-10653983)
 * Hello [@smohannagaraj](https://wordpress.org/support/users/smohannagaraj/)
 * This is the example JavaScript snippet for adding an attribute to the div-wpuf.
 *     ```
       var wpufFields = document.querySelectorAll(".wpuf-fields");
       wpufFields.forEach(function(field) {
         field.setAttribute("data-tip", "value");
       });
       ```
   
 * Regards
    -  This reply was modified 7 years, 9 months ago by [Mehedi Hasan](https://wordpress.org/support/users/thebengalboy/).
    -  This reply was modified 7 years, 9 months ago by [Mehedi Hasan](https://wordpress.org/support/users/thebengalboy/).
    -  This reply was modified 7 years, 9 months ago by [Mehedi Hasan](https://wordpress.org/support/users/thebengalboy/).
 *  Thread Starter [smohannagaraj](https://wordpress.org/support/users/smohannagaraj/)
 * (@smohannagaraj)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/adding-tool-tip-using-java-get-content-from-another-div-for-input-fields/#post-10655936)
 * Ok. But I want to get the value from the label. (Eg. Title)
 *  [Mehedi Hasan](https://wordpress.org/support/users/thebengalboy/)
 * (@thebengalboy)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/adding-tool-tip-using-java-get-content-from-another-div-for-input-fields/#post-10670933)
 * Hello [@smohannagaraj](https://wordpress.org/support/users/smohannagaraj/),
 * I have already provided you the sample code. You can change the “value” as per
   your requirements.
 * Thanks
 *  Thread Starter [smohannagaraj](https://wordpress.org/support/users/smohannagaraj/)
 * (@smohannagaraj)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/adding-tool-tip-using-java-get-content-from-another-div-for-input-fields/#post-10674407)
 * Sorry. Please give the code that i can straightly put it on my website. I don’t
   know java script very well.
 * Please!
 * Thank U!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Adding Tool tip using java get content from another div for input fields’
is closed to new replies.

 * ![](https://ps.w.org/wp-user-frontend/assets/icon-256x256.gif?rev=2818776)
 * [User Frontend: AI Powered Frontend Posting, User Directory, Profile, Membership & User Registration](https://wordpress.org/plugins/wp-user-frontend/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-user-frontend/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-user-frontend/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-user-frontend/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-user-frontend/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-user-frontend/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * 4 replies
 * 2 participants
 * Last reply from: [smohannagaraj](https://wordpress.org/support/users/smohannagaraj/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/adding-tool-tip-using-java-get-content-from-another-div-for-input-fields/#post-10674407)
 * Status: resolved