Forums

Error Massage in Top of the form?

hofmannbus 10 Mar, 2025

^ Message :-)

Hello,

Is it possible that if the security query or other required fields are filled out incorrectly or not at all, the error message will appear at the beginning of the form? After pressing the send button, the form jumps up and the field marked in red is out of sight. The problem is that you can't see straight away on your smartphone that the form hasn't been sent.

hofmannbus 11 Mar, 2025

Is it possible to place this error message in another module position? See Screenshot below...

This Code does not work...

<?php if (!empty($this->errors)) : ?>
	<div class="nui alert red">
		<ul>
			<?php foreach ($this->errors as $error) : ?>
				<li><?php echo $error; ?></li>
			<?php endforeach; ?>
		</ul>
	</div>
<?php endif; ?>
Bildschirmfoto 2025-03-11 um 09.49.44.png
hofmannbus 11 Mar, 2025

It has now been solved with CSS.

The problem was that there are still some module positions above the form on the smartphone, and so the error message is placed below the visible area of ​​the smartphone. The customer thinks the form has been sent. With the CSS code, the message is now at the top on the Website.

.nui.alert.red {
  z-index: 999;
  position: absolute;
  top: 50px;
  padding: 50px 10px 50px 10px;
  font-size: 1.2em;
  line-height: normal;
  margin-right: 30px;
}
Max_admin 13 Mar, 2025
Answer
1 Likes

Thank you for the solution

I have added a fix to the next update to auto scroll the page to the error even if the error is at a level lower than the visible area of the page

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.