Can the Error Message for a form be placed at top of page...

I have a rather lengthy intro for a form. If they submit the form with an error or missing a required field, the error message shows after the lengthy form intro, and the submitter may miss that there is an error and the form requires resubmitting. They see only the top of the intro and would have to scroll all the way down to the actual form fields to know that there was an error.
 
It's a system message, displayed by the Joomla template.

I think you can find it in $formModel->getForm()->error (I didn't test) and so display it again somewhere in a custom form template.

And/or you can adapt the text in the form settings (e.g. telling the users they have to scroll down to see the failing field(s)).
 
The successful message displays at the top after a submit ... it is only the failed submission where it is under the introduction.
Yes, I did that... If they do not see a success message the intro says to scroll down to the form for viewing any errors.
 
In your template's default.php file you should be able to move the following lines:
Code:
<div class="fabrikMainError alert alert-error fabrikError<?php echo $active?>">
    <button class="close" data-dismiss="alert">×</button>
    <?php echo $form->error; ?>
</div>
above the line:
Code:
echo $form->intro;

PS. Didn't test this myself.
 
Like in the .../components/com_fabrik/views/form/tmpl/bootstrap_tabs or .../components/com_fabrik/views/form/tmpl/bootstrap Folders?
 
Exactly!

And if you don't want the change to be overwritten when updating Fabrik, I recommend to make a copy of the bootstrap template and use the copied template in your forms.

Like in the .../components/com_fabrik/views/form/tmpl/bootstrap_tabs or .../components/com_fabrik/views/form/tmpl/bootstrap Folders?
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top