quantacms / quanta

An innovative, DB-free CMS for web and application development, based on the principles of Quantum physics.
http://www.quantacms.com
MIT License
33 stars 7 forks source link

add ajax form to quanta #392

Closed MohamedTaha880 closed 3 months ago

MohamedTaha880 commented 3 months ago

Now we can add Ajax param to the form qtag and the form will be submitted with Ajax request To show a success message you can add an HTML tag with id: formId_confirm_message And to show an error message you can add an HTML tag with class submit-error-message Example:

  <div id="feedback_confirm_message" class="confirm-message hidden"><b>[TEXT|tag=feedback-confirm-message:Il tuo messaggio è stato ricevuto Grazie]</div>
    {FORM|name=feedback|ajax:
  [HTML_TAG:{TEXT|tag=feedback-intro:Il tuo feedback è importante per noi. Facci sapere come sta andando il tuo soggiorno!}]
  <span class="hidden submit-error-message">[TEXT|tag=submit-form-error:Si è verificato un errore durante l'invio. Per favore riprova più tardi]</span>
    }