Opened 18 years ago

Closed 10 years ago

#4363 closed New feature (fixed)

Formpreview doesn't support newform's dynamic initial values

Reported by: Indy Owned by: nobody
Component: contrib.formtools Version: dev
Severity: Normal Keywords: preview
Cc: sciyoshi@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

The formpreview has no hook for dynamic initial field values. The attached patch provides this hook.

Attachments (1)

preview.diff (1.1 KB ) - added by Indy 18 years ago.

Download all attachments as: .zip

Change History (9)

by Indy, 18 years ago

Attachment: preview.diff added

comment:1 by Honza Král, 17 years ago

Why not make this a bit more generic? If you look at #3218 (shameless promotion), it has this fixed - it can cope with initial data (via self.initial), custom rendering mechanisms etc.

Wouldn't it make more sense to build a common super class for FormPreview and Wizard? There is some shared code in already and since both classes are used in a very similar manner, it would make sense to refactor the common parts out. I will be happy to do the work.

comment:2 by Jacob, 17 years ago

Triage Stage: UnreviewedDesign decision needed

comment:3 by Samuel Cormier-Iijima <sciyoshi@…>, 17 years ago

Cc: sciyoshi@… added

comment:4 by Russell Keith-Magee, 14 years ago

Needs tests: set
Patch needs improvement: set
Triage Stage: Design decision neededAccepted

Patch is out of date, but the approach seems fine. Needs tests as well.

comment:5 by Łukasz Rekucki, 14 years ago

Severity: Normal
Type: New feature

comment:6 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:7 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:8 by Greg Chapple, 10 years ago

Resolution: fixed
Status: newclosed

formtools has been extracted into its own repository (​​​​​https://github.com/django/django-formtools/). Because of this, the issue tracking for this package has been moved to GitHub issues. I'm going to close this ticket, but I've created a GitHub issue to replace it where the conversation can continue: ​​​​​https://github.com/django/django-formtools/issues/24. Thanks!

Note: See TracTickets for help on using tickets.
Back to Top