Page MenuHomePhabricator

allow for parsing of field definition default parameter for dynamic content
Closed, ResolvedPublic

Description

Author: xologrim

Description:
patch for SF1.9 to allow default parsing

Adding the possibility to parse the default value allows for more dynamic form content. E.g. the default values could be based on a SMW query.

Attached is a patch for includes/SF_FormPrinter.inc for SF 1.9.
It was tested with:

  • ParserFunctions and other such extensions
  • #ask queries
  • sfgCacheFormDefinitions enabled

The parsing only happens once during initial display of the form, not on previews and submits.

The same approach could probably be used for the "values=" parameter, but has not yet been implemented and tested.


Version: unspecified
Severity: enhancement

Attached:

Details

Reference
bz22821

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:05 PM
bzimport set Reference to bz22821.

mitchell_neill wrote:

This is really great. The first step towards more dynamic forms. Gets my vote :)

Thanks for the patch - this capability was actually added to SF in version 2.1.1, a few months ago.