#template
<select id="cars" name="carlist" form="carform">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
<form class=”f1” style=”display:none;” method=>
</form>
<form class=”f2” style=”display:none;” method=>
</form>
<form class=”f3” style=”display:none;” method=>
</form>
<script>
Document.querySelector(“select”).addEventListener(“change”,(ele)={
If ele.target.textContent ==”Volvo”:
..
Else if
...
Else
...
})
</script>
Otherwise just send a form to pick the user preference out of Basic, Standard, Advanced, get the request and based on the request’s attributes send a form back through redirect function.
Sent from Mail for Windows 10
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cb12fc88-0d5a-4ec4-a6d6-1272a0a69d9a%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5ec6100b.1c69fb81.97f6e.083a%40mx.google.com.
CHOICES=[('Basic','Basic'),
('Standard','Standard'),
('Advanced','Advanced')]
class Modelname(models.Model):
pack=models.CharField(max_length=12,choices=CHOICES,blank=True)
Forms.py
class Formname(forms.ModelForm):
class meta:
model=modelname
fields=(pack,name,email)
| |||||
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPcTzRaKzDosDCbUMR%3DHyM6bDEvk3VPmhEEcZ750Lho0uwrFjw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANqZwQmvAk-ZW7U-s-c97PZmuQSmB1mnJ-LfFK8wZYqjg3DSiA%40mail.gmail.com.