0

Hey, I am trying to create a form where in I can input 3 or more values on it, but I do not know where to start I am planning to create a datagrid like in PHP, Guys can you help me? Thank you.

3
Contributors
4
Replies
19
Views
1 Year
Discussion Span
Last Post by bLuEmEzzy
0

This is a rather vague question, but I'm going to try to make an effort. What you could possibly do is use ajax/jquery to give the user a choice of how many input fields to display ... rows and columns, while dynamically generating unique identifiers for each one and using those to save data to database.

0

Hi, ohh is there other means to do it? I do not know ajax or jquery. Just simple javascript only. hmmmm

0

This could be a very complicated or very simple solution - depends what you want to do. You say you want an Excel-type grid. So an confused when you say you are using 3 inputs instead.

If you want to build this from scratch, then I suggest using JS for the main guts of it. I'm not sure that PHP would even come into it unless you're CRUDing data. For a simple implementation, you could get away with building an empty html table with fixed cellsize. You'd only need one textbox (or textarea), which would "shift" to the current cell with e.g. 'click' event. This textarea would read/write as it entered/left the cell. You'd involve PHP at the end with the big SAVE button maybe. Not sure you'd need to Ajax every little action. Nothing stopping you ajaxifying the whole thing, but a bit costly on the old server.

There will be many many third party scripts out there for this sort of thing - the obvious ones are the 'edit-in-place' scripts.

Edited by diafol

0

Ahh ok. Thank you for the idea. I'll come back soon for progress. Thank You!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.