1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Contact Form

Discussion in 'Resource and Add-on Requests' started by wickedstangs, Jul 23, 2015.

  1. wickedstangs

    wickedstangs Well-Known Member

    Anyone is there an add-on or a simple way to place a contact form on the sidebar?
    Capture.JPG
     
  2. batpool52!

    batpool52! Well-Known Member

    Where do you want to place the contact form?
     
  3. wickedstangs

    wickedstangs Well-Known Member

    Like to place it in the Sidebar in every page..
     
  4. batpool52!

    batpool52! Well-Known Member

    Find:
    PHP:
                    <!-- sidebar -->
                    <
    aside>
                        <
    div class="sidebar">
    Add After:
    PHP:
                            <div class="section contactUsForm">
                                <
    style>
                                    .
    sidebar .section.contactUsForm form.xenForm
                                    
    {
                                        
    width100%;
                                    }
                                 
                                    .
    sidebar .section.contactUsForm form.xenForm .ctrlUnit dt
                                    
    {
                                        
    width0px !important;
                                    }
                                 
                                    .
    sidebar .section.contactUsForm form.xenForm .ctrlUnit dd
                                    
    {
                                        
    floatnone;
                                        
    width100%;
                                    }
                                </
    style>
                                <
    div class="secondaryContent">
                                    <
    h3><a href="{xen:link misc/contact}">{xen:phrase contact_us}</a></h3>
                                    <
    form action="{xen:link 'misc/contact'}" method="post" class="xenForm formOverlay AutoValidator sidebarContactUs" data-redirect="no" data-reset="yes">
                                     
                                        <
    dl class="ctrlUnit surplusLabel">
                                            <
    dt><label for="ctrl__guestUsername">{xen:phrase your_name}:</label></dt>
                                            <
    dd><input type="text" name="_guestUsername" value="{$visitor.username}id="ctrl__guestUsername" class="textCtrl" autofocus="true" placeholder="{xen:phrase your_name}" /></dd>
                                        </
    dl>
                                     
                                        <
    dl class="ctrlUnit surplusLabel">
                                            <
    dt><label for="ctrl_email">{xen:phrase your_email_address}:</label></dt>
                                            <
    dd><input type="text" name="email" id="ctrl_email" class="textCtrl" value="{xen:if '{$visitor.email}', '{$visitor.email}', ''}" placeholder="{xen:phrase your_email_address}" /></dd>
                                        </
    dl>
                                 
                                        <
    xen:include template="helper_captcha_unit" />
                                 
                                        <
    dl class="ctrlUnit surplusLabel">
                                            <
    dt><label for="ctrl_subject">{xen:phrase subject}:</label></dt>
                                            <
    dd><input type="text" name="subject" class="textCtrl" id="ctrl_subject" placeholder="{xen:phrase subject}..." /></dd>
                                        </
    dl>
                                 
                                        <
    dl class="ctrlUnit surplusLabel">
                                            <
    dt><label for="ctrl_message">{xen:phrase message}:</label></dt>
                                            <
    dd><textarea name="message" class="textCtrl Elastic" id="ctrl_message" rows="5"></textarea></dd>
                                        </
    dl>
                                 
                                        <
    dl class="ctrlUnit submitUnit">
                                            <
    dt></dt>
                                            <
    dd><input type="submit" value="{xen:phrase send_message}" accesskey="s" class="button primary" /></dd>
                                        </
    dl>
                                 
                                        <
    input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}/>
                                        <
    input type="hidden" name="redirect" value="{$redirect}/>
                                    </
    form>
                                </
    div>
                            </
    div>
    In template PAGE_CONTAINER.

    Preview:
    upload_2015-7-24_8-17-2.png
     
    Last edited: Jul 23, 2015
    wickedstangs likes this.
  5. wickedstangs

    wickedstangs Well-Known Member

    @batpool52!


    Wow that is exactly what I needed very cool and Thanks you very much... Can I buy you a beer?
     
    batpool52! likes this.
  6. wickedstangs

    wickedstangs Well-Known Member

    Beer sent..:) again thank you very much..
     
    batpool52! likes this.
  7. wickedstangs

    wickedstangs Well-Known Member

  8. batpool52!

    batpool52! Well-Known Member

    That would require custom development :/
     

Share This Page