public function additionalHTMLForInput($cur_value, $field_name, $template_name)
 {
     $text = '';
     // Add a field just after the hidden field, within the HTML, to
     // locate where the multiple-templates HTML, stored in
     // $multipleTemplateString, should be inserted.
     if ($this->mHoldsTemplate) {
         $text .= SFFormPrinter::makePlaceholderInFormHTML(SFFormPrinter::placeholderFormat($template_name, $field_name));
     }
     // If this field is disabled, add a hidden field holding
     // the value of this field, because disabled inputs for some
     // reason don't submit their value.
     if ($this->mIsDisabled) {
         if ($field_name == 'free text' || $field_name == '<freetext>') {
             $text .= Html::hidden('sf_free_text', '!free_text!');
         } else {
             if (is_array($cur_value)) {
                 $delimiter = $this->mFieldArgs['delimiter'];
                 $text .= Html::hidden($this->mInputName, implode($delimiter, $cur_value));
             } else {
                 $text .= Html::hidden($this->mInputName, $cur_value);
             }
         }
     }
     if ($this->hasFieldArg('mapping template') || $this->hasFieldArg('mapping property') || $this->hasFieldArg('mapping cargo table') && $this->hasFieldArg('mapping cargo field')) {
         if ($this->hasFieldArg('part_of_multiple')) {
             $text .= Html::hidden($template_name . '[num][map_field][' . $field_name . ']', 'true');
         } else {
             $text .= Html::hidden($template_name . '[map_field][' . $field_name . ']', 'true');
         }
     }
     if ($this->hasFieldArg('unique')) {
         $semantic_property = $this->template_field->getSemanticProperty();
         if ($semantic_property != null) {
             $text .= Html::hidden('input_' . $sfgFieldNum . '_unique_property', $semantic_property);
         }
         $fullCargoField = $this->template_field->getFullCargoField();
         if ($fullCargoField != null) {
             // It's inefficient to get these values via
             // text parsing, but oh well.
             list($cargo_table, $cargo_field) = explode('|', $fullCargoField, 2);
             $text .= Html::hidden('input_' . $sfgFieldNum . '_unique_cargo_table', $cargo_table);
             $text .= Html::hidden('input_' . $sfgFieldNum . '_unique_cargo_field', $cargo_field);
         }
         if ($this->hasFieldArg('unique_for_category')) {
             $text .= Html::hidden('input_' . $sfgFieldNum . '_unique_for_category', $this->getFieldArg('unique_for_category'));
         }
         if ($this->hasFieldArg('unique_for_namespace')) {
             $text .= Html::hidden('input_' . $sfgFieldNum . '_unique_for_namespace', $this->getFieldArg('unique_for_namespace'));
         }
         if ($this->hasFieldArg('unique_for_concept')) {
             $text .= Html::hidden('input_' . $sfgFieldNum . '_unique_for_concept', $this->getFieldArg('unique_for_concept'));
         }
     }
     return $text;
 }