Field Tooltips

  • Howard Theriot
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 8 months ago - 3 years 8 months ago #142875 by Howard Theriot
Field Tooltips was created by Howard Theriot
How can I change field descriptions on my subscription form to display as an inline block below the field instead of as a popup tooltip?

Thanks,
Howard
Last edit: 3 years 8 months ago by Howard Theriot.

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
3 years 8 months ago #142884 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Field Tooltips
Hello Howard

You will need to modify code of the file components/com_osmembership/view/fieldlayout/controlgroup.php

On that file, you can use $row->title; to get title of the field
$row->description to get description of the file

Then modify it to meet your own need

Once the modification is done, you should move the modified file to PATH_TO_TEMPLATE/html/com_osmembership/fieldlayout folder so that the change won't be lost when you update to future releases of the extension

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Howard Theriot
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 8 months ago #142947 by Howard Theriot
Replied by Howard Theriot on topic Field Tooltips
That worked great!
Thanks,
Howard

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
3 years 8 months ago #142948 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Field Tooltips
Great. Maybe you can share the code you modified here in case someone needs it?

Thanks

Please Log in or Create an account to join the conversation.

  • Howard Theriot
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 8 months ago - 3 years 8 months ago #142949 by Howard Theriot
Replied by Howard Theriot on topic Field Tooltips
Yes, of course. I modified components/com_osmembership/view/fieldlayout/controlgroup.php as follows:
Code:
<!-- Add field description -->     <div class="<?php echo $controlsClass; ?>">         <?php echo $input; ?><br>         <small><?php echo $row->description; ?></small>     </div>

And then I removed the tooltip at components/com_osmembership/view/fieldlayout/label.php
Code:
<!-- Remove tooltip --> <label id="<?php echo $name; ?>-lbl" for="<?php echo $name; ?>"<?php if ($class) echo ' class="' . $class . '"' ?>>
Attachments:
Last edit: 3 years 8 months ago by Howard Theriot. Reason: code snippet formatting

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
3 years 8 months ago #142950 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Field Tooltips
Great. Thanks for sharing

Tuan

Please Log in or Create an account to join the conversation.