Ticket #5666: newforms_prefix.diff
File newforms_prefix.diff, 802 bytes (added by , 17 years ago) |
---|
-
docs/newforms.txt
860 860 <li>Instrument: <input type="text" name="instrument" /></li> 861 861 <li>Haircut type: <input type="text" name="haircut_type" /></li> 862 862 863 864 Prefixes for Forms 865 ------------------ 866 867 You can put several Django Forms between one ``<form>`` tag. To give 868 each Form its own namespace you need to use the keyword argument 869 ``prefix``. If you want to use several PersonForms in one HTML form:: 870 871 >>> mother=PersonForm(prefix="mother") 872 >>> father=PersonForm(prefix="father") 873 >>> print father.as_ul() 874 <li>First name: <input type="text" name="father-first_name" /></li> 875 ... 876 877 863 878 Fields 864 879 ====== 865 880