0

I am looking to prepopulate a page full of fields (not webform) from a json file. There are a lot of fields on the page and some of them contain a lot of info, so it doesnt appear that it is practical to use the prepopulate module. https://www.drupal.org/project/prepopulate

I have a rather long form that the user needs to fill in, but they likely already have the required info in a file on their pc. To save them manually filling it in, the user will upload a file which will then be processed (externally) and a json will be returned. The form will then be filled in automatically based on the processed results. Some of these fields are paragraphs with multiple fields.

If possible it would be ideal if this can be done without drupal module development. I've looked at how this can be done with js and possibly some python on the server side, but I'm still a little lost when it comes to how drupal handles these things.

Any guidance on where to go?

5
  • This is pretty vague. Can you share some sample data and/or code or other specifics?
    – Beau
    Jul 14 at 14:37
  • @Beau It is somewhat vague at the moment because I don't know where to look. The 2nd para explains the entire journey I'm trying to achieve. Either the user can fill out the form themselves, or they can upload a file which will then be processed externally and the form will be filled in for them (and they can tweak it if needed). I just don't know how to achieve this or where to look for help. I edited OP to hopefully explain a little better
    – yuuuu
    Jul 14 at 14:42
  • I don't understand how you want to populate a Drupal form with Python or without a custom module. A module is certainly required here to fill in your custom logic.
    – Kevin
    Jul 14 at 15:06
  • Take a look at the Feeds module and the Feeds Extensible Parser module. You shouldn't need to do anything with Python or any other external processing. This also sounds like a great use-case for Webform, as well, which can be auto-populated and, as a bonus, you can manage your webforms via YAML, if you want.
    – Beau
    Jul 14 at 15:06
  • Just noticed I never replied. Thanks @Beau feeds extensible parser was exactly what I was looking for.
    – yuuuu
    Sep 22 at 14:41

Your Answer

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

Browse other questions tagged or ask your own question.