F
F
Fedor_PV2018-08-07 06:51:04
Django
Fedor_PV, 2018-08-07 06:51:04

How to insert custom JavaScript validation code in Django form template?

Started learning JavaScript, I want to experiment with form fields, write JS functions to validate input data as I want, and not use inline validation, but in Django all form fields are inline

<form method="post" enctype="multipart/form-data">
        {% csrf_token %}
        {{ form.as_p }}

How to be? How to get some kind of separate field from inside {{ form.as_p }} and play with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Shatalov, 2018-08-07
@Fedor_PV

https://docs.djangoproject.com/en/dev/topics/forms...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question