core-bundle icon indicating copy to clipboard operation
core-bundle copied to clipboard

Help/Info-text for form fields (form generator)

Open AlexanderPilhar opened this issue 7 years ago • 6 comments

It would be nice if it was possible to add help/info-text to a form field using the form generator. Just like we can see on backend. contao-form_generator-form_field-help_text

AlexanderPilhar avatar Apr 04 '18 07:04 AlexanderPilhar

Why not use the Field type Explanation?

Aybee avatar Apr 04 '18 14:04 Aybee

Why not use the Field type Explanation?

That would not be the same. It's an independent widget and does not have a logical connection to any other widget.

fritzmg avatar Apr 04 '18 14:04 fritzmg

check this out: https://github.com/hofff/contao-formtools

cliffparnitzky avatar Apr 04 '18 15:04 cliffparnitzky

@fritzmg It's an independent widget and does not have a logical connection to any other widget.

But there's no big difference in logical connection I think.

<!-- Contao BE -->
<div class="widget">
  <h3>Fieldname</h3>
  <input>
  <p>Explanation</p>
</div>

<!-- FE form explanation -->
<div class="widget input">
  <input>
</div>
<div class="widget explanation">
  <p>Explanation</p>
</div>

Aybee avatar Apr 04 '18 15:04 Aybee

But there's no big difference in logical connection I think.

First example is one widget, second example are two widgets. How would you be able to freely align such explanations in a grid for example, if the explanation is in a completely different widget? You could wrap both widgets in a fieldset, sure. But that's rather inconvenient for the editor.

fritzmg avatar Apr 04 '18 15:04 fritzmg

Ah ok, I see. You mean that both are not wrapped together in a DIV. I thought that this is no big difference but I agree that the handling might be better when they are wrapped together. And also when the explanation belongs to the same dataset as the filed. So some of the fieldtypes need a new field explanation so we can output it as we want to.

Aybee avatar Apr 04 '18 15:04 Aybee