contact us form

am looking for my site  contact us form . my site is not dating website. i like to contact us form in  spacial page ... user can send eamil  by contact us from .

dincer al
Quote · 16 Jul 2013

the default contact us form is accessed by going to your_site.com/contact.php or if you look at the bottom of the site (footer where about us, faq, copyright. etc is at) the COntact Us link should be down there by default.

caredesign.net
Quote · 16 Jul 2013

The contact us form does not have a builder.  To make any changes in the form you have to edit the php file.  To remove the contact us link in the bottom menu, just go to builders and click on bottom menu.  You can drag the item to the inactive block.  If you want to place a menu item for it in another location, just create the link http://your_site.tld/contact.php.  For example, if you wanted to add it to the top menu, just go to builders and choose navigation menu and add an item there and link to the contact.php file.

If you need any help, just ask.

Geeks, making the world a better place
Quote · 16 Jul 2013

Why no builder for Contact Us... makes no sense...

P.

Peer L. Plaut Executive Director, Single Booklovers Connecting Bookworms Since 1970
Quote · 24 Sep 2013

Where is Deano when you need him!

Deano, can you make a mod that will allow us to easily modify the contact us page, add columns, etc.?

Thanks!

Peer

Peer L. Plaut Executive Director, Single Booklovers Connecting Bookworms Since 1970
Quote · 24 Sep 2013

One more complaint... :) This again is one of the inconsistencies in the Dolphin script of which collectively drive Dolphin administrators nuts.... 

There. I'm done!

P.

Peer L. Plaut Executive Director, Single Booklovers Connecting Bookworms Since 1970
Quote · 24 Sep 2013

The form is created by the script; no builder for it.  My guess is that they never updated it since the early days.

Geeks, making the world a better place
Quote · 24 Sep 2013

Geek Girl-

Thanks, so you see, if one wants to create blocks, columns and such on this page... well, its going to be a challenge.

Peer

Peer L. Plaut Executive Director, Single Booklovers Connecting Bookworms Since 1970
Quote · 24 Sep 2013

i created a new page for the contact us form (see pic).

Created a new page called contact_us.php with following code (you could make a backup of your contact.php and create a new contact.php - that way you dont have to change any existing links):

<?php

require_once( 'inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );
 bx_import('BxDolPageView');

 class BxContactPageView extends BxDolPageView {
     function BxContactPageView() {
         parent::BxDolPageView('contact_us'); // Attention! Here should be name which you will insert into sys_page_compose_pages in next step.
     }
     
     
function getBlockCode_ContactForm()
{

     $aForm = array(
            'form_attrs' => array(
                'name'     => 'form_Contact',
                'method'   => 'post',
            ),

            'params' => array (
               
                      'db' => array(
                    'table' => 'sys_messages', // table name
                    'key' => 'ID', // key field name
                    'uri' => '', // uri field name
                    'uri_title' => '', // title field to generate uri from
                    'submit_name' => 'submit_contact_form', // some filed name with non empty value to determine if the for was submitted,
                                                       // in most cases it is submit button name
                ),
                'csrf' => array(
                      'disable' => true, //if it wasn't set or has some other value then CSRF checking is enabled for current form, take a look at sys_security_form_token_enable to disable CSRF checking completely.
                )
              ),
            'inputs' => array(
                'header1' => array(
                    'type' => 'hidden',
                ),
        'Name' => array(
            'type' => 'text',
            'name' => 'Subject',
                      'db' => array (
                        'pass' => 'Xss',  
                    ),
            'caption' => _t("Name"),
            'checker' => array (
                'func' => 'length',
                'params' => array(3, 256),
                'error' => _t('_sys_adm_form_err_required_field'),
            ),
        ),
        'Email' => array(
            'type' => 'text',
            'name' => 'Email',
                      'db' => array (
                        'pass' => 'Xss',  
                    ),
            'caption' => _t("Email"),
            'checker' => array (
                'func' => 'length',
                'params' => array(3, 256),
                'error' => _t('_sys_adm_form_err_required_field'),
            ),
        ),
        'Message' => array(
            'type' => 'textarea',
            'name' => 'Text',
                      'db' => array (
                        'pass' => 'Xss',  
                    ),
            'caption' => _t("Message"),
        ),
        'Captcha' => array(
            'type' => 'slider',
            'name' => 'replace_captcha',
            'caption' => _t("Slide to Right"),
            'checker' => array (
                'func' => 'length',
                'params' => array(3, 3),
                'error' => _t('Please slide to the right to verify you are human'),
            ),
        ),
                'header1_end' => array(
                    'type' => 'block_end'
                ),
             'submit_send' => array(
            'type' => 'submit',
                    'colspan' => true,
            'name' => 'submit_contact_form',
            'value' => _t("Send"),
        ),
             ),
        );

        $oForm = new BxTemplFormView ($aForm);
        $oForm->initChecker();

        if ($oForm->isSubmittedAndValid ()) {
$profileID = getID( $_GET['ID'] );
            // add additional vars to database, in this case creation date field is added
            $aValsAdd = array (
            'sender' => $_COOKIE['memberID'],
            'recipient' => $profileID,
            );
if ($oForm->insert ($aValsAdd)) {

 $to = "your_email@email.com";
 $subject = $_POST['Subject'];
 $body = $_POST['Text'];
 $from = $_POST['Email'];
 $headers = "From: " . $from;
               
                if (mail($to, $subject, $body, $headers)) {
$sStatusText = 'Message Successfully Sent.';
  } else {
$sStatusText = 'Message Not Sent';
  }

            }
        }
                if($sStatusText)
            $sStatusText = MsgBox(_t($sStatusText), 3);

        return array($sStatusText . $oForm->getCode(), array(), array(), false);
 
}


function getBlockCode_AddedBlock()
    {
    return "I am a new block on the Contact Us Page";
    }
    
 }
    
 $_page['name_index']    = 1;
 $_page['header'] = 'Contact Us';
 $_ni = $_page['name_index'];

 $oEPV = new BxContactPageView();
 $_page_cont[$_ni]['page_main_code'] = $oEPV->getCode();

 PageCode();

 

then added to database tables:

INSERT INTO `sys_page_compose` (`ID`, `Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`, `Cache`) VALUES ('', 'contact_us', '1140px', 'Contact us Form', 'Contact Us', '0', '0', 'ContactForm', '', '1', '72.5', 'non,memb', '0', '0');

INSERT INTO `sys_page_compose` (`ID`, `Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`, `Cache`) VALUES ('', 'contact_us', '1140px', 'Added block on contact us form', 'Added Block on Contact page', '0', '0', 'AddedBlock', '', '1', '100', 'non,memb', '0', '0');

INSERT INTO `sys_page_compose_pages` (`Name`, `Title`, `Order`, `System`) VALUES ('contact_us', 'Contact Us', '0', '1');

ALTER TABLE `sys_messages`  ADD `Email` VARCHAR(45) NOT NULL

 

then clear cache, and go to pagebuilders and put blocks on page where you want them. You can also add php blocks or whatever else you want to from here.

In my usage, I added the message into the sys_messages table just in case the email fails for whatever reason, thus the sql to edit the sys_messages table. You can add whatever fields you want to the contact form with a little modification. Hope this helps put you in the right direction. It works for me, but cant guarantee it is what everyone else wants.

new contact us form1.png · 692.7K · 386 views
caredesign.net
Quote · 24 Sep 2013

After going over a few things with Deanos (a genius with Dolphin) I have made changes to my Contact Form as follows:

 

function getBlockCode_ContactForm()
{

$aForm = array(
            'form_attrs' => array(
                'name'     => 'form_Contact',
                'method'   => 'post',
            ),

            'params' => array (
              
                      'db' => array(
                    'table' => 'sys_messages', // table name
                    'key' => 'ID', // key field name
                    'uri' => '', // uri field name
                    'uri_title' => '', // title field to generate uri from
                    'submit_name' => 'submit_contact_form', // some filed name with non empty value to determine if the for was submitted,
                                                       // in most cases it is submit button name
                ),
                'csrf' => array(
                      'disable' => true, //if it wasn't set or has some other value then CSRF checking is enabled for current form, take a look at sys_security_form_token_enable to disable CSRF checking completely.
                )
              ),
            'inputs' => array(
                'header1' => array(
                    'type' => 'hidden',
                ),
        'Name' => array(
            'type' => 'text',
            'name' => 'Subject',
                      'db' => array (
                        'pass' => 'Xss', 
                    ),
            'caption' => _t("Name"),
            'checker' => array (
                'func' => 'length',
                'params' => array(3, 256),
                'error' => _t('_sys_adm_form_err_required_field'),
            ),
        ),
        'Email' => array(
            'type' => 'text',
            'name' => 'Email',
                      'db' => array (
                        'pass' => 'Xss', 
                    ),
            'caption' => _t("Email"),
            'checker' => array (
                'func' => 'length',
                'params' => array(3, 256),
                'error' => _t('_sys_adm_form_err_required_field'),
            ),
        ),
        'Message' => array(
            'type' => 'textarea',
            'name' => 'Text',
                      'db' => array (
                        'pass' => 'Xss', 
                    ),
            'caption' => _t("Message"),
        ),
        'Captcha' => array(
            'type' => 'slider',
            'name' => 'replace_captcha',
            'caption' => _t("Slide to Right"),
            'checker' => array (
                'func' => 'length',
                'params' => array(3, 3),
                'error' => _t('Please slide to the right to verify you are human'),
            ),
        ),
                'header1_end' => array(
                    'type' => 'block_end'
                ),
             'submit_send' => array(
            'type' => 'submit',
                    'colspan' => true,
            'name' => 'submit_contact_form',
            'value' => _t("Send"),
        ),
             ),
        );

        $oForm = new BxTemplFormView ($aForm);
        $oForm->initChecker();

        if ($oForm->isSubmittedAndValid ()) {
$profileID = getID( $_GET['ID'] );
            // add additional vars to database, in this case creation date field is added
            $aValsAdd = array (
            'sender' => $_COOKIE['memberID'],
            'recipient' => $profileID,
            );
if ($oForm->insert ($aValsAdd)) {

 $to = getParam('site_email_notify');;
 $subject = "New Contact at MTSDemo from " . $_POST['Subject'];
 $body = 'You have a new message awaiting.';
              
                if (sendMail($to, $subject, $body)) {
$sStatusText = 'Message Successfully Sent. We will contact you soon, but will not leave a phone message.';
  } else {
$sStatusText = 'Message Not Sent';
  }

            }
        }
                if($sStatusText)
            $sStatusText = MsgBox(_t($sStatusText), 3);

        return array($sStatusText . $oForm->getCode(), array(), array(), false);
}

 

again, this is a form created based on our needs and may not be exactly what you want, but I hope it gives you the direction you are looking for.

caredesign.net
Quote · 24 Sep 2013

Thanks, I will save this out for future reference.

Geeks, making the world a better place
Quote · 24 Sep 2013

 

Where is Deano when you need him!

Deano, can you make a mod that will allow us to easily modify the contact us page, add columns, etc.?

Thanks!

Peer

 

Per your request. Contact Us page in the page builders.

Download the attached replacement contact.php and upload to your server. Make a backup copy of the old one first.

Now run the following two SQL lines in phpMyAdmin

INSERT INTO `sys_page_compose_pages` (`Name`, `Title`, `Order`, `System`) VALUES ('contact_us', 'Contact Us', 1, 1);

INSERT INTO `sys_page_compose` (`Page`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`, `Cache`) VALUES ('contact_us', 'Contact Us', '_CONTACT_H', 1, 0, 'ContactForm', '', 1, 100, 'non,memb', 0, 0);


Clear your dolphin cache.


contact.php · 5.2K · 354 downloads
https://www.deanbassett.com
Quote · 25 Sep 2013

@deanos - show off - roflmfaop - Thanks, now I can go and undo everything I did. Again, thanks for the great help you provide and insight to most things Dolphin

caredesign.net
Quote · 25 Sep 2013

 

@deanos - show off - roflmfaop - Thanks, now I can go and undo everything I did. Again, thanks for the great help you provide and insight to most things Dolphin

LOL

I only did this one because it was easy.

There are many other pages that are not in the page builders. I don't have a complete list. Someday i may do them all.

And the name is Deano BTW. Not Deanos




My Name is Neo.  The Matrix has you.  LOL



https://www.deanbassett.com
Quote · 25 Sep 2013

Deano-

If you ever make all the code to make these packages available and then put this in the Market Place, I will purchase.

Thanks for all you do!!!

:)

Peer

Peer L. Plaut Executive Director, Single Booklovers Connecting Bookworms Since 1970
Quote · 26 Sep 2013

OK-

Deano This totally ROCKS!!!!

Thanks again!

Per

Peer L. Plaut Executive Director, Single Booklovers Connecting Bookworms Since 1970
Quote · 26 Sep 2013

Deano- I knew this was you.

Thanks for finding this.. :)

P

Peer L. Plaut Executive Director, Single Booklovers Connecting Bookworms Since 1970
Quote · 14 May 2014

hi i saw this today

i wanted a form where users can contact admin, when they want admin to activate there membership.

i want members to contact admin to approve 

now for this, i wanted a form where members can pick option from dropdown as why they want to reach admin and one of options then will be , to request membership activation

 

when i uploaded new form, it noticed that its same as now new from in latest version 

can we have a form as suggested above.

tk

anil

Quote · 29 Aug 2015

j

caredesign.net
Quote · 29 Aug 2015

You can check out the Advanced Contact module which has advanced featured such as the creation of custom fields for the "Contact Us" form.

Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 30 Aug 2015

I tried all the steps but it is not working 

i checked the phpmysql values and there are there 

but it is still not working 

what did i do wrong?

Quote · 20 Sep 2015

I tried all the steps but it is not working 

i checked the phpmysql values and there are there 

but it is still not working 

what did i do wrong?

Quote · 20 Sep 2015

I tried all the steps but it is not working 

i checked the phpmysql values and there are there 

but it is still not working 

what did i do wrong?

The Deano script was made before the major 7.2 Dolphin Upgrade so may longer work.

It would be nice to know if the contact.php Deano gives does work with Dolphin 7.3.0

~~~~~~~~~~~~~~~~~~~~~~
MichelMeta-Travel.com
~~~~~~~~~~~~~~~~~~~~~~

TravelNotes.org - The Online Guide to Travel
Quote · 17 Jun 2016
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.