Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

80
Vistas
Updating parent form with a select2 field when closing another modal form django

I am trying to add this functionality to my django app. I have a select2 field as a ForeignKey data type field in my main form. Now, I also got an "add" button right next to it that when clicked, opens a modal with another form. That form creates another instance for the select2 to look for, another entry, so that's good and settled. But, I want it to, when submitting the form in the modal, instead of the main form page being refreshed and having to refill all other fields again, it automatically selects the instance it has just created on the select2 field. I am fairly new to the front-end aspect of it all so it would be great to have some guidance.

7 months ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos