stephenmcd / django-forms-builder

Let users build forms in Django admin
BSD 2-Clause "Simplified" License
691 stars 281 forks source link

Field slug is failing with +100 chars labels #226

Closed Pijuli closed 6 years ago

Pijuli commented 6 years ago

Issue: When creating a NEW field and putting in it a long string (+100 chars) it will fail to create, aparently because of slug. When creating a NEW field and putting in it a short string (-100 chars) it will create it correctly. As the slug has been correctly created then you can edit the label and set it longer than 100 chars

How to reproduce? Create a new form, go to fields. Add a field with a long label (+100 chars), set it's type, try to save. Data error rises. image

How to avoid? Create a new form, go to fields. Add a field with a short label (-100 chars), set it's type, save, edit, change label to long string (+100 chars), save. Done

Fix proposal:

I can do a PR if you want. Your call

stephenmcd commented 6 years ago

Let's just increase the length to 2000, it will need a migration too. Can you create a PR with that? Thanks

Pijuli commented 6 years ago

Done https://github.com/stephenmcd/django-forms-builder/pull/227