Django Modelform with checkbox value --------

Asked

Viewed 57 times

0

Good night! How do I remove ---------- from my form, in some options I put a default on the model but for this option I can’t do that, how can I solve this problem?

inserir a descrição da imagem aqui

  • A solution would be to use js in the template, for this you would have to first empty select, make the append of the first element like this: append('<option value="" disabled selected>Selecione um ubc</option>'). I do this in an example project made for a response here at STO, if you want to see the whole project, at the end of the answer has the link to the project on github. Link to the question

  • I’m sorry for answering just now, thank you so much for your help

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.