Form.formid has no effect on Field.oid autogeneration

Open
#394 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, python
Domain
frontend

Research direction

Start with deform/field.py around the autogenerated oid logic and review the Form documentation linked in the issue. Reproduce a page containing multiple forms with different formid values, then verify that generated DOM ids do not conflict and that the existing shared-counter behavior remains understandable.

Written by the indexing model from the issue text.

Description

bug needs-pr should backport

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?

Dominant language
JavaScript
Stars
423
Forks
158
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Pylons/deform

All issues in Pylons/deform

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.