Pylons / deform

A Python HTML form library.
Other
416 stars 160 forks source link

Form.formid has no effect on Field.oid autogeneration #394

Open ezag opened 4 years ago

ezag commented 4 years ago

As per docs, formid argument is intended for placing more than one Deform form into a single page. Though autogenerated oids will conflict in this case (violating HTML standard and breaking JS that rely on DOM ids) unless being explicitly specified in schema, or multiple forms being initialized with a shared counter. Could this be fixed by making parent formid a part of autogenerated oid?

stevepiercy commented 4 years ago

@ezag I think that is a good proposal. Would you like to submit a PR with tests? I'd accept it.

Please note that we are dropping Python 2.7 and 3.4 in the next release, so you don't need to test for that.