How to display filled form values of page in final tab in JQuery?

fatherazrael

There are forms in several tabs of a document.

A user fill a form in one tab say "Finance Tab".

Form includes Labels, Radio, Textbox, Date

When go to final tab; We need to display what he have filled in Finance tab in form of table.

Say following is HTML of form which he filled, I am just entering demo values which have repetitive panels but have elements with different or same id or different data-type:

<div class="panel clonablePart" id="Money_panel1">
 <label class="boldText">Amount</label>
 <input type="text" id="gula.bugula">
 <label class="boldText">Is amount correct</label>
 <input type="radio" /> Yes <input type="radio" /> No
</div>

<div class="panel clonablePart" id="Money_panel2">
 <label class="boldText">amount</label>
 <input type="text" id="gula.bugula" data-forfinalScreen>
 <label class="boldText">Is amount great?</label>
 <input type="radio" data-forfinalScreen /> Yes <input type="radio" /> No
</div>

Please share your inputs how to do that in jQuery?

How can i pick values of all Inputs and Label in a DIV dynamically in jQuery?

Update 1: Please consider there are 50 fields which are to be displayed on final tab. If any changes in HTML required then i am open to do that.

rahimv

You can select all the input elements at once and print values like below

//select all inputs in a div with id Money_panel1
$("#Money_panel1 :input").each(function( index ) {

    //if it is a textbox get value
    if( $(this).attr("type")  == "text"  )
      alert( $( this ).val() );

    //if it is radio/checkbox get whether its checked or not
    else if(  $(this).attr("type") == "radio" )
        alert( $(this).is(":checked") );

 });

If you want to select multiple items you can write jquery selector like

$("#Money_panel1 :input, #Money_panel1 label")

You can determine type of element using .prop("tagName") method if you are mixing labels and inputs.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

jquery focus first form element on tab of final

From Dev

How to retain an filled values if page reloads in ruby

From Dev

How to calculate the final total Jquery inventory form

From Dev

How to link to specific tab page in JQuery mobile?

From Dev

How to stay on tab when refresh page in jQuery?

From Dev

Display form values in another div(display) using jquery on submit

From Dev

How do I post a form, update a query and display the results on the same page with ColdFusion/jQuery?

From Dev

Track the URL page the user filled in an Enquiry form

From Dev

How to validate php if form is filled

From Dev

How to display success message in a form submit after sending a mail successfully using malsup form jquery without page refresh

From Dev

How to display empty values after duplication of form

From Dev

how to display database values in form of multidimensional array

From Dev

Display form input values from one page to another

From Dev

How can I get JavaDoc to display the values of static final variables?

From Dev

How to display a particular tab from another form in vb.net

From Dev

How to display JS values on my HTML page

From Dev

jquery tab page not found

From Dev

Android: How to display values in Tab Layout while passing data from it

From Dev

jQuery make sure all form fields are filled

From Dev

Check if every elemnt from a form is filled JQUERY

From Dev

Show a form filled with Javascript variables in jquery mobile

From Dev

jQuery formBuilder how to display form data in XML?

From Dev

How to get the values of a tab form in ajax to another php file?

From Dev

redux-form : How to display form values on another component

From Dev

How to display a gif in the middle of a div page in jQuery?

From Dev

checking all values if empty or filled using jquery

From Dev

checking all values if empty or filled using jquery

From Dev

Multiply two input values and display answer as paragraph on page using jQuery

From Dev

jquery Accordion - how to open the second tab by default on page loading

Related Related

  1. 1

    jquery focus first form element on tab of final

  2. 2

    How to retain an filled values if page reloads in ruby

  3. 3

    How to calculate the final total Jquery inventory form

  4. 4

    How to link to specific tab page in JQuery mobile?

  5. 5

    How to stay on tab when refresh page in jQuery?

  6. 6

    Display form values in another div(display) using jquery on submit

  7. 7

    How do I post a form, update a query and display the results on the same page with ColdFusion/jQuery?

  8. 8

    Track the URL page the user filled in an Enquiry form

  9. 9

    How to validate php if form is filled

  10. 10

    How to display success message in a form submit after sending a mail successfully using malsup form jquery without page refresh

  11. 11

    How to display empty values after duplication of form

  12. 12

    how to display database values in form of multidimensional array

  13. 13

    Display form input values from one page to another

  14. 14

    How can I get JavaDoc to display the values of static final variables?

  15. 15

    How to display a particular tab from another form in vb.net

  16. 16

    How to display JS values on my HTML page

  17. 17

    jquery tab page not found

  18. 18

    Android: How to display values in Tab Layout while passing data from it

  19. 19

    jQuery make sure all form fields are filled

  20. 20

    Check if every elemnt from a form is filled JQUERY

  21. 21

    Show a form filled with Javascript variables in jquery mobile

  22. 22

    jQuery formBuilder how to display form data in XML?

  23. 23

    How to get the values of a tab form in ajax to another php file?

  24. 24

    redux-form : How to display form values on another component

  25. 25

    How to display a gif in the middle of a div page in jQuery?

  26. 26

    checking all values if empty or filled using jquery

  27. 27

    checking all values if empty or filled using jquery

  28. 28

    Multiply two input values and display answer as paragraph on page using jQuery

  29. 29

    jquery Accordion - how to open the second tab by default on page loading

HotTag

Archive