Opened 10 years ago

Closed 2 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: master
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 10 years ago.

Download all attachments as: .zip

Change History (9)

Changed 10 years ago by Indy

Attachment: preview.diff added

comment:1 Changed 9 years ago by Honza Král

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 Changed 9 years ago by Jacob

Triage Stage: UnreviewedDesign decision needed

comment:3 Changed 9 years ago by Samuel Cormier-Iijima <sciyoshi@…>

Cc: sciyoshi@… added

comment:4 Changed 6 years ago by Russell Keith-Magee

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 Changed 6 years ago by Łukasz Rekucki

Severity: Normal
Type: New feature

comment:6 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:7 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:8 Changed 2 years ago by Greg Chapple

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