The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Error message anchor tag - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Error message anchor tag (/showthread.php?tid=2355) |
Error message anchor tag - SgeordieN - Jan 24th, 2013 Hi Firstly, good work with ft it's making things do much easier for my web design projects. I just wanted to find out if there is a way of setting an anchor tag to the form so that when it returns a validation error (server side) it loads the page at the form and not at the top. The main problem I have is that when the site is responsive in mobile view the form is way down the page and it can be hard to see there are errors without scrolling all the way down to check. Alternative is have the js version popup the message window as that draws attention but I'd rather it loaded the page at the form. In addition to that but less important can the errors be under each input box instead of a single list of what needs attention? Hope you can give some advice. Many thanks Steve. RE: Error message anchor tag - SgeordieN - Jan 24th, 2013 I think I have found the solution but it seems too simple and not being a PHP expert I dont want to break the form process by doing something I shouldnt. I simply replaced the action="<?php echo $_SERVER["PHP_SELF"]?>" with action="pagename.php#form" with the anchor id pointing to my form DIV. Seems to work but it also seems too simple and does this mean that the form is written to pagename.php#form and not pagename.php and if so could this cause errors if using in multipage forms? |