test
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • fabiojordan Friend
    #1012631

    Hi there.

    I use the JA Quick Contact Module to let our users sent emails about errors or sugestions to our articles.

    I want to know if its possible to setup the module to capture the URL where the user sent the form (so they dont have to inform the link manually) and send it within the form to my email.

    Anyway to do that?

    Thanks in advance!

    Saguaros Moderator
    #1012737

    Hi,

    It will require customization to achieve that, did you try with a 3rd party extension for contact form which supports that feature?

    You can seek for a suitable one in JED

    fabiojordan Friend
    #1012890

    Hi,

    I didn’t try other extensions, because JA Quick Contact are enough for my needs, except for this one about the URL. So, what I was expecting to do is to add something like this:

    <?php
    $link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
    echo $link;
    ?> 

    Add this inside the email, but I dont know in which file and the part I have to do that. If it’s not possible, I guess I’m gonna live with that, because I cant spend money in another solution right now.

    Do you think that code would do the trick?

    Thanks again for your time.

    Saguaros Moderator
    #1012989

    Hi,

    If you wanna customize this module, the base file of module locates in this directory: ROOT/modules/mod_jaquickcontact/tmpl/

    You can copy files in this folder and copy to folder of template: ROOT/templates/your_default_template/html/mod_jaquickcontact/ and add your custom change there.

    Regards

    fabiojordan Friend
    #1013175

    Thanks for the reply, Saguaros.

    I have two workarounds for those needing similar solutions:

    1) Add the following code inside "<textarea class="textarea" id="contact_text" name="text" rows="10" cols="40" >"

    <?php
    $link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
    echo $link;
    ?> 

    This will output the URL inside the textarea, sending the URL within the message (but maybe the user can delete the URL by mistake). So, I have a second solution:

    2) Before the li of "<label id="contact_subjectmsg", insert the following php code:

    <?php
    $doc = JFactory::getDocument(); 
    $pagetitle = $doc->getTitle();
    ?>

    After that, change the input of "contact message like that":

    <input class="input-text" id="contact_subject" name="subject"  value="Error in page *<?php echo  $titulopagina ?>*"  size="40"/>

    This will output the page title in the subject of the email. Again, someone can delete the text, so you can hide this li . 😉

    Hope that helps someone.

    Please, mark the topic as solved.

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 4 replies, has 2 voices, and was last updated by  fabiojordan 7 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum