Item8892: Hidden fields are not rendered when creating new topic with FlexFormPlugin

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: FlexFormPlugin
Branches:
Reported By: PasiHaekkinen
Waiting For:
Last Change By: MichaelDaum
If FlexFormPlugin is to used to create new topic (i.e. the topic containing the web form does not contain the form meta fields), fields set as hidden are not rendered.

Possible fix:

current:
if ($isHidden) {
  # sneak in the value into the topicObj
  my $metaField = $topicObj->get('FIELD', $fieldName);
  $metaField->{value} = $fieldValue if $metaField;
  $fieldEdit = $field->renderHidden($topicObj);
} else {

fixed:
if ($isHidden) {
  # sneak in the value into the topicObj
  my $metaField = $topicObj->get('FIELD', $fieldName);
  if ($metaField) {
    $metaField->{value} = $fieldValue;
  } else {
    # metafield not set in WebTopic, add new one for rendering hidden field
    $metaField = { name => $fieldName, title => $fieldName, value => $fieldValue}; 
  }
  # save field back to topic object
  $topicObj->putKeyed('FIELD', $metaField);
  $fieldEdit = $field->renderHidden($topicObj);
} else {

-- PasiHaekkinen - 12 Apr 2010

Fixed in version 2.31. Thanks for the patch, Pasi!

-- MichaelDaum - 23 Jul 2010

ItemTemplate edit

Summary Hidden fields are not rendered when creating new topic with FlexFormPlugin
ReportedBy PasiHaekkinen
Codebase 1.0.9, trunk
SVN Range
AppliesTo Extension
Component FlexFormPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins FlexFormPlugin:5fe723fd9e29
TargetRelease n/a
ReleasedIn
Topic revision: r4 - 23 Jul 2010, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy