Thank you.
Will give it a try.

On Tuesday, December 24, 2019 at 7:03:23 PM UTC+5:30, Nitin Kalmaste wrote:
>
> You can do request.get[field name]
> And make your conditions in views
>
> On Tue 24 Dec, 2019, 6:50 PM shree hari, <[email protected] 
> <javascript:>> wrote:
>
>> # views.py
>> def price_choices(request):
>>     if request.method == "GET":
>>         context = {} 
>>         context['form'] = pricechoice() 
>>         return render( request, "template_form.html", context)
>>
>> # forms.py
>> price_CHOICES =( 
>>     ("1", "25"), 
>>     ("2", "50"), 
>>     ("3", "100"), 
>>     ("4", "200"), 
>> ) 
>>
>> class pricechoice(forms.Form): 
>>     pricechoice = forms.ChoiceField(choices = price_CHOICES,  
>> widget=forms.RadioSelect()) 
>>
>> # template
>> <form method = "GET"> 
>>     {{ form }}
>> </form>
>>
>>
>> If choice 25 is selected, i want it make a calculation.
>> How can i do it ?
>>
>> -- 
>> 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 [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/0bf89c8f-e6e9-4a45-a5fc-c8fcbbd3c125%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/0bf89c8f-e6e9-4a45-a5fc-c8fcbbd3c125%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0e015928-2f02-4c44-a83a-1e3e03de0ac4%40googlegroups.com.

Reply via email to