Code

Opened 7 years ago

Last modified 4 years ago

#4363 new New feature

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 7 years ago.

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by Indy

comment:1 Changed 7 years ago by Honza_Kral

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 6 years ago by jacob

  • Triage Stage changed from Unreviewed to Design decision needed

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

  • Cc sciyoshi@… added

comment:4 Changed 4 years ago by russellm

  • Needs tests set
  • Patch needs improvement set
  • Triage Stage changed from Design decision needed to Accepted

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

comment:5 Changed 3 years ago by lrekucki

  • Severity set to Normal
  • Type set to New feature

comment:6 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:7 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new
The owner will be changed from nobody to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.