0

I have a jQuery map that I've built that allows users to select states and counties. This is all done in Javascript. I would like to, on form submit, take this data and submit it to the user's profile2.

Should I create an empty form element and fill it somehow? It seems like there wouldn't be a way to pass any information to a form that happened after page creation.

2
  • Is this map that you created already in place? Were/are you utilizing it on the user's edit info page or somewhere else on the site? You may want to consider instead using something like Geofield: drupal.org/project/geofield This would allow user map input (on an OpenLayers map) via a new field that you can attach to the User entity (or any fieldable entity) and would collect the data into a "Drupal" way, freeing you up to focus on how to display the information, as opposed to doing a custom POST action using JS to your Drupal site, which could be time-consuming. If you are looking Aug 18, 2014 at 3:48
  • I'm using it in user registration, though they'll also be able to edit it on their user edit page too. It'll save taxonomy terms associated with the various locations. I'd like to do it in a similar way to hierarchical select, but I can't quite figure out how they're saving data.
    – Jack Ryan
    Aug 18, 2014 at 4:08

0

Your Answer

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

Browse other questions tagged or ask your own question.