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">
  • Do I have to use the hooks or something? – Chief May 24 '17 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? – Romans-8---31-39 May 25 '17 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 May 26 '17 at 16:44
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();
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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