Express Form Customization

Permalink
Hi There,

I am using express form and followed the tutorial to customize the form markup here:https://documentation.concrete5.org/developers/express/express-forms...

That worked quite good, but I still have some questions left:

1. I would like to add a for="" attribute to my labels, which point to the respecting input field id. Since the label markup is not within the same file as the input itself, I wonder how to get the id field.

// my markup for a form control
<div class="m-form__row g-container g-layout-form">
   <div class="g-cell g-cell-label">
      <?php if ($view->supportsLabel()) { ?>
         <label class="m-form__label">
            <?php echo $view->getLabel()?>
            <?php if ($view->isRequired()) { ?>
               <span class="m-form__label-required"> *</span>
            <?php } ?>
         </label>
      <?php } ?>
   </div>
   <div class="g-cell g-cell-field">
      <?php $view->renderControl()?>
   </div>


How can I get the input id from $view?

2. How can I add a radio button group to my express form? Within the dialog, I haven't found an answer type radio button?

3. How can I add a fieldset title? Within the code, there is a variable
<?php if ($fieldSet->getTitle()) { ?>
   <legend><?php echo h($fieldSet->getTitle()) ?></legend>
<?php } ?>

But I haven't found an answer type in the Add dialog of the express form. Is it not supposed to be used within the express form?

4. In the express form dialog, there is answer type "Display Text" With that type, I can add Custom Richtext to my form. How can I change the markup, which get's outputted for this answer type? (E.g. add a wrapper div)

Thanks for any inputs
Best regards
Jan

janwidmer
 
janwidmer replied on at Permalink Reply
janwidmer
any ideas?