Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / Extensions / Support / Use the contact form not only on standalone?

foxhound
#1 2014-11-12 16:34

I am trying to allow me to access the contact form (the default plugin coming with the package) from a page, not just the standalone page.
I would like to use the form from within other areas on the website as well.

I have no idea how (and if even) I can achieve this so I tried changing the hooks to page and some other things but except making sure the plugin dopes not work at all I cant get anywhere.

I hope there is someone who is able to help me with this :)

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
Dayver
#2 2014-11-16 14:08

For first step try use read AJAX Helpers in Cotonti and in any tpl include html code an example:

        <div id="ajax_contact">
          <form action="index.php?e=contact" method="post" name="contact_ajax" id="contact_ajax" class="ajax post-ajax_contact">
          ...
          any your code from contact form
          ....
          <button type="submit" class="btn btn-primary">{PHP.L.Submit}</button>
          </form>
        <div>

 

Pavel Tkachenko aka Dayver. Гик и веб мастер который делает сайты, увлекается электроникой и очень любит смотреть кино.
О себе: Я злой и страшный серый волк, я в поросятах знааааюююю толк
foxhound
#3 2014-11-18 00:19

Thanks for that but I know how to include a form (with ajax). I was just hoping the default contact plugin could be used so contacts were actually written to the DB and any of the staff could reply. (easier than sharing mail accounts).

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />