0

I have a grid with 4 columns that i'm trying to get before they click submit. Each time they add a row (non member player) in this grid I need to grab that rows data and use it with PHP to show information based off their gender and expected ranking.

When I inspect the input box in dev tools, it doesn't seem to spit out that data so i'm having trouble triggering as I don't know how it stores that data. I would've thought it would've changed the "value" of that input. A columns input looks something like this after I enter "testname":

<input type="text" name="non_member_players[rows][new_row_1][col_id_9]" value="" dir="ltr" field_content_type="all" maxlength="256">
3
  • Do I have to use the hooks or something?
    – Chief
    Commented May 24, 2017 at 11:57
  • A little more clarity might help. Where is this happening: Front end Channel Form, or backend in the control panel? And you want to work with grid data before it's submitted (on a live form) or after it's already in the database? Commented May 25, 2017 at 15:36
  • I have a form inside a channel form tag.... as you fill out data I'm doing some ajax work based on data you enter and I need to grab the grid data to do ajax as you fill in the form.
    – Chief
    Commented May 26, 2017 at 16:44

1 Answer 1

1

Think I found it. Despite the dev tools not showing the actual value on the input that was filled in, i was able to grab data based off the name attr and it spits out the filled in data still.

$('input[name="non_member_players[rows][new_row_1][col_id_9]"]').val();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.