开发者

display django fom from formset only when required

开发者 https://www.devze.com 2023-02-16 03:22 出处:网络
This might be simple but not able to get the work done. here is a modelformset using which specific # of forms could be displayed:

This might be simple but not able to get the work done. here is a modelformset using which specific # of forms could be displayed:

formfact = formset_factory(ModelForm,extra = count)
fset = depffact(prefix='new')

My question is: how can i display single form a time,how can i modify it such a way that everytime user clicks a button previous forms are validated and one more modelform is displayed. i.,show form1,if asked for show #2,#3 etc

i t开发者_运维问答ried keeping track of count and using that count but was not successful.Ideas most welcome


by mistake i asked similar question twice but i did answer it in this post incase if you want to refer. if you have a better solution, appreciate you sharing it.

0

精彩评论

暂无评论...
验证码 换一张
取 消