sure, I will do it by tomorrow
On Tue, Jun 9, 2020 at 2:35 AM Balaji Shetty <balajishe...@gmail.com> wrote: > Nice > > Can you please share sample code on git link. > > This is very common requirement in every project > > > > On Tuesday, June 9, 2020, chaitanya orakala <chaitu.orak...@gmail.com> > wrote: > >> Thank You, Amine Aziz. I tried jquery and it worked. its so simple once >> we know jquery. >> do help others like you did to me. >> >> On Sun, Jun 7, 2020 at 1:18 PM AMINE AZIZ <a.amine...@gmail.com> wrote: >> >>> I will share with you my iwn code used in admin , but it still the same >>> as the front end >>> >>> withe jQuery i can show input or hide it , so you will do the same with >>> popup , by default it will be display none, and with Jquery you can show it >>> if user change value to yes dropdown (select) >>> >>> you will use id div of pupup to show it or hide it >>> >>> >>> if (!$) { >>> // Need this line because Django also provided jQuery and namespaced as >>> django.jQuery >>> $ = django.jQuery; >>> } >>> >>> >>> >>> $(document).ready(function() { >>> >>> $("#id_paysPartenaires").change(function() >>> { >>> >>> >>> >>> var >>> total_partenaire=$("#id_multipartenairecooperationbilaterale_set-TOTAL_FORMS").val() >>> var SelectNumber = i >>> >>> SelectedValuePartenaire=$("#id_multipartenairecooperationbilaterale_set-"+SelectNumber+"-multiPartenairePP").val() >>> //alert(SelectNumber) >>> >>> >>> >>> >>> $("[id=div-2-multiAdefinir]:eq("+SelectNumber+")").hide(); >>> >>> $("[id=div-2-multiGouvernementPP]:eq("+SelectNumber+")").hide(); >>> >>> $("[id=div-2-multiGouvernementPP]:eq("+SelectNumber+")").hide(); >>> >>> $("[id=div-2-multiPaysPP]:eq("+SelectNumber+")").show(); >>> } >>> >>> >>> }); >>> >>> >>> Le dimanche 7 juin 2020 07:34:00 UTC+1, Sai a écrit : >>>> >>>> Hi guys, >>>> I am working on a* Django project,* which involves submission form and >>>> saving the data in the database using model form. I am stuck with one of >>>> the functionalities of form which should work like for example "do you want >>>> benefit plan: *YES,* *next Field options should pop up*. if click* NO, >>>> nothing should happen* and move to the next question." >>>> >>>> I went through all over the internet and found the dependent drop-down >>>> select option but not like field pop up as we click through te form. >>>> >>>> Please let me know how to achieve this in a clear way as I am new to >>>> Django and programming as well. >>>> >>>> Thank You so much in advance..... >>>> >>> -- >>> 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+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/3f3bf262-7fac-4818-836e-dc8532dae707o%40googlegroups.com >>> <https://groups.google.com/d/msgid/django-users/3f3bf262-7fac-4818-836e-dc8532dae707o%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 django-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAPcTzRabB90jUEuYj1v-9JWdOMqqsM4fjN-TEq1CwOcwEPX1zA%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAPcTzRabB90jUEuYj1v-9JWdOMqqsM4fjN-TEq1CwOcwEPX1zA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Mr Shetty Balaji > Asst. Prof. > IT Department > SGGS I&T > Nanded. My. India > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAECSbOt4OiS_WLAucNWQtwpWuZ_LZe1hXyM4%3DFXZzmm6mSVGHw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAECSbOt4OiS_WLAucNWQtwpWuZ_LZe1hXyM4%3DFXZzmm6mSVGHw%40mail.gmail.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 django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPcTzRZb4y8yGrf%3DM%3DX4cEhGaf_TWmMnszknWd13Zen_uxfMHw%40mail.gmail.com.