Remember me

Change format of form submission content

6 months 2 weeks ago #1

  • Paul Gomirato's Avatar
  • Paul Gomirato
  • Posts: 838
Hi

When form is submitted, there is a huge space to the left of the form fields content.
See attached.

How can we adjust this so all content is flush left?

I have had a few customers complain about this and don't see any reason for it either.

6 months 2 weeks ago #2

  • Viacheslav's Avatar
  • Viacheslav
  • Posts: 28858
Hello,
Thank you for contacting us

This can only be done using a custom email layout (HTML/CSS + data tags)

Regards,
Vyacheslav, Balbooa.com

6 months 2 weeks ago #3

  • Paul Gomirato's Avatar
  • Paul Gomirato
  • Posts: 838
Thanks Vyacheslav

Can you provide direction on how to do this? I submitted the ticket because I'm not clear what to do.

Also, is there any purpose to the indent? Why would this not be removed in the core file(s)? I assume from the solution you will provide, it would mean having to apply it on every GB Form installation.

Thanks!

6 months 2 weeks ago #4

  • Viacheslav's Avatar
  • Viacheslav
  • Posts: 28858
You can make changes to the file
field-email-pattern.php (\com_baforms\views\form\tmpl\submission\field-email-pattern.php)
All changes will be lost after the update.

Best Regards,
Vyacheslav, Balbooa Support Team

6 months 2 weeks ago #5

  • Paul Gomirato's Avatar
  • Paul Gomirato
  • Posts: 838
Thank you
Is there a reason for this indent?

Would it not make sense to remove this space in the associated core file to eliminate the need to continually modify the file after version updates?

6 months 2 weeks ago #6

  • Paul Gomirato's Avatar
  • Paul Gomirato
  • Posts: 838
One more thing...

I can't tell from the styling below what is causing the indent and what CSS specifically is needed - can you apply the style modification in the content below?
Thank you.

<div style="max-width: 100%; width: 550px; margin: 0 auto;">
<span style="color:#333;font-weight: bold;line-height:28px;font-size:16px;white-space: normal;display:block;">
<?php echo $field->title; ?>:
</span>
<?php
if ($field->type == 'signature') {
?>
<img src="<?php echo JUri::root().$value; ?>">
<?php
} else {
?>
<span style="color: #999;text-align: left;line-height: 28px;font-size: 16px;word-break: break-word;margin-bottom: 30px;display:block;">
<?php echo $value; ?>
</span>
<?php
}
?>
</div>
<?php
if ($field->type == 'poll') {
?>
<div style="max-width: 100%; width: 550px; margin: 0 auto;">
<span style="color:#333;font-weight: bold;line-height:28px;font-size:16px;white-space: normal;display:block;"><?php echo JText::_('POLL_RESULTS'); ?></span>
<div style="color: #999;text-align: left;line-height: 28px;font-size: 16px;word-break: break-word;margin-bottom: 30px;display:block;">
<?php
$pollResults = (array)$field->results;
usort($pollResults, function($a, $b){
if ($a->order == $b->order) {
return 0;
}

return ($a->order < $b->order) ? -1 : 1;
});
$lastPoll = end($pollResults);
foreach ($pollResults as $result) {
?>
<div style="<?php echo $lastPoll != $result ? 'border-bottom: 1px solid #f3f3f3; ' : ''; ?>padding: 10px 0;">
<span style="width: 400px; display: inline-block;"><?php echo $result->title; ?></span>
<span style="width: 100px; display: inline-block;"><?php echo $result->votes.' '.JText::_('VOTES'); ?></span>
<span style=" font-weight: bold;color: #333;"><?php echo $result->percent; ?>%</span>
</div>
<?php
}
?>
</div>
</div>

6 months 2 weeks ago #7

  • Viacheslav's Avatar
  • Viacheslav
  • Posts: 28858
You need to remove margin: 0 auto; (center alignment of the element)

Best Regards,
Vyacheslav, Balbooa Support Team
Powered by Kunena Forum