Note that there are some explanatory texts on larger screens.

plurals
  1. POJS - Advice on how to merge multiple user input to one form field design
    text
    copied!<p>I have a page that allows users to enter a lot of information about them (metadata) they can then click on a icon which opens a modal window containing a googlemap which allows them to add locations, and a title for that location.</p> <p>Using mootools I can pass the value of a form field back to the original form, using onclose. The main page form then has a single hidden input field, which goes into the database as one field, serialised. </p> <p>The problem is a user can add as many locations as they want, there are also 3 types of location. Each with its own set of co-ordinates, which can be single or multiple!</p> <p>So I want to know the best way to handle all of this data, is it possible to load it into one form and then use Moo to submit that form to a single form field, or can I use moo to just append all the information into a single hidden input field, but if I do that, how does user input come into it. Im stumped and looking at some suggestions on how to set this up in the 'best' possible way.</p> <p>Currently I have a table, and each item is added as a new row, by JS when a user clicks on the map, it creates a new row with the details about the click, item and then a user input field.</p> <p>If its a single location then its added as 'placemark', a user input field for the name and then the co-ordinates go into a 3rd table cell. However if its a shape, then the first cell contains 'shape', user input field for name/description, and the third cell contains a list of co-ordinates one for each point, this is the same for lines.</p> <p>The problem I have is I could write it all to a single form field, but then how do I allow for user input of the titles, I need to use a form field for that? The other option is to take each row from a table and input it into the single form field, seperated by a pipe or similar, but then im not sure if I can read from other form fields.</p> <p>I hope the above makes some sense!! All feedback welcome!</p> <p>Im using mootools for this, but providing I can get my head around the layout then that should not really be an issue.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload