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

Contact Form

batpool52!

Well-known member
#4
Find:
PHP:
                <!-- sidebar -->
                <aside>
                    <div class="sidebar">
Add After:
PHP:
                        <div class="section contactUsForm">
                            <style>
                                .sidebar .section.contactUsForm form.xenForm
                                {
                                    width: 100%;
                                }
                             
                                .sidebar .section.contactUsForm form.xenForm .ctrlUnit > dt
                                {
                                    width: 0px !important;
                                }
                             
                                .sidebar .section.contactUsForm form.xenForm .ctrlUnit > dd
                                {
                                    float: none;
                                    width: 100%;
                                }
                            </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: