WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
[resolved] Selected Rows to FORM submission (6 posts)

  1. gufranchorghay
    Member
    Posted 1 year ago #

    Hi

    WP-Table Reloaded working very much fine.

    Anybody help me out for the using table with CHECKBOX
    <input type="checkbox" name="mag" value="1"> in each row last col. with the value say 1,2,3 ...

    Out of the 10 rows I am selecting 2 rows using checkbox (tick mark)

    End of the table I have one BUTTON.

    after clicking the BUTTON I want to make a new Table or Form with those selected (2 rows) for further submission.

    Please help me out with javascript.

    I got the following javascript but I do'nt know how use.
    $('input:checked').each(function() {
    // To pass this value to its nearby hidden input
    $(this).parent('td').next('input').val($(this).val()); });

    Gufran

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your question.

    The only real chance I see here is some extended JavaScript code. You could start with adding a checkbox to each row of the table (just enter the HTML), and with some JavaScript code similar to what you post.
    When someone clicks on the button, you could for example copy the rows with the selected checkboxes via jQuery, into a new table.
    If that has a form tag around it, it should be possible to have that submitted.

    Unfortunately, I can't really help with the details or exact code, as that is out of scope of WP-Table Reloaded and I just don't have the time and knowledge to give such extended support. Sorry.
    So, the best way to proceed for you is probably to learn some JavaScript/jQuery and then try this step by step. There's a nice tutorial at http://jqfundamentals.com/ that I recommend.

    Best wishes,
    Tobias

  3. gufranchorghay
    Member
    Posted 1 year ago #

    thanks

  4. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    sure, no problem!

    Best wishes,
    Tobias

  5. gufranchorghay
    Member
    Posted 1 year ago #

    Please browse the following website:
    http://rarebookssashi.com/books/magazines/advertising-graphics/

    This is what I am looking for;
    Visitor will select the books/magazine and pass the value to the form for the Quote by click the button [Request for Quote], this is same as [Add to Cart].

    I am not a developer, just using WordPress themes and plugins.

    Any suggestion,

    Gufran

  6. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    well, instead of using JavaScript, you could also develop some PHP script that saves the selection to a database or sends you an email, or similar.
    Then you would just have to wrap the table and the button in a HTML <form> tag that submits the form to that PHP script.

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic