Hi!
There is a feedback form with two alert about successful sending or error.
How to make this alert auto-close after a certain time? The difficulty is that they form in php sending emails.
Is it possible to prescribe the solution in the php file or is there a js script to AutoClose alert if they appear on the page?
Here is the code:
$result = "; if (mail ($to, $subject, $body, $headers)) { $result .= ''; $result .= ''; $result .= 'SENT SUCCESSFULLY!'; $result .= ''; echo $result; die(); } $result = "; $result .= ''; $result .= ''; $result .= 'ERROR SENDING'; $result .= ''; echo $result;
Found one example AutoClose, but I can't adapt to your code.
https://codepen.io/CSWApps/pen/XJoLmN