开发者

display django fom from formset only when required

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜