Wednesday, August 24, 2022

Re: I want to fetch the value of radio field for updation but it only doesn't fetch even i use condition and value does comes but doesn't checked

i dont have much idea but try to do with True Or False value bcz maybe it returns boolean value.

On Mon, Aug 22, 2022 at 12:27 PM Abhinandan K <abhinandan@snakescript.com> wrote:
<label>Email</label>
<input type="email" name="email" value={{datas.email}}>
{% with val_gen=datas.gender%}
{{val_gen}}
<label>gender:</label><br></br>

<input type="radio" name="gender" value="Male"{% if val_gen == Male %} checked{% endif %} >Male</input>
<input type="radio" name="gender" value="Female"{% if val_gen == Female %} checked{% endif %}>Female</input><br><br>
<input type="submit" value="Update">
{% endwith %}
</form>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA6_Mp44RQjMeWfVW82vvT2-GLrv5Jpu2nb_6edWON_3sgXQwQ%40mail.gmail.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAC10kRG9fXHxO3WPaWftOWEH6jXoV%3D6DNEoV2UyoQNah53NaDA%40mail.gmail.com.

No comments:

Post a Comment