Can change the width of Contact us block?

Hi All,

I hope you would be able to help me in this. I have found myself working with Boonex suddenly so I am learning as I go on albeit having many challenges. One of them, that to me should have been simple but not, is this: I want to change the width of the Contact us page or, I want to be able to create a php block on a double column page, one of the columns would contain the contact us form.

We have Deano's tools including the Block tools which I have use to create a php page and inserted this line of code include("contact.php") ?> . Obviously, I am wrong because it gives me error.

Your help and that of anyone in the community would be greatly appreciated.

Regards

Quote · 23 Nov 2011

The syntax is incorrect.

You have include("contact.php") ?>

Should be include("contact.php");

However i do not believe it will yield the results you want. Many pages cannot just simply be included in that manner. Lack of understanding what the include function is for and what it does.

I will have to experiment.


https://www.deanbassett.com
Quote · 23 Nov 2011

Yea, you're right it doesn't work at all that way. I have seen, for example you have a contact us page with a smaller form. How did you do it?

Quote · 23 Nov 2011

Perhaps your form is malfunctioning.

Mine is the default that comes with dolphin. I made no changes other than adding a note to the top to ask people not to use the form for support questions.

The form itself is identical to the default that all dolphin installs have. No difference in size or number of fields. It would help to see yours. It should be the same as the default install which you can see here on the boonex demo site. http://demo.boonex.com/contact.php





https://www.deanbassett.com
Quote · 23 Nov 2011

My form is the same size and it is functioning alright. I guess I would leave it as it is. All I wanted was to make that block a two column block.

 

Thanks anyway.

 

 

Quote · 23 Nov 2011

Ok. Well this code will show the form in a php block.

Note the area in red below that will need to be changed to the name of your newpage. Change the name newpage to whatever you named the page your putting this block on.


    global $oTemplConfig, $site;

    $sActionText = '';

    $aForm = array(
        'form_attrs' => array(
            'id' => 'post_us_form',
            'action' => BX_DOL_URL_ROOT . 'page/newpage',
            'method' => 'post',
        ),
        'params' => array (
            'db' => array(
                'submit_name' => 'do_submit',
            ),
        ),
        'inputs' => array(
            'name' => array(
                'type' => 'text',
                'name' => 'name',
                'caption' => _t('_Your name'),
                'required' => true,
                'checker' => array(
                    'func' => 'length',
                    'params' => array(1, 150),
                    'error' => _t( '_Name is required' )
                ),
            ),
            'email' => array(
                'type' => 'text',
                'name' => 'email',
                'caption' => _t('_Your email'),
                'required' => true,
                'checker' => array(
                    'func' => 'email',
                    'error' => _t( '_Incorrect Email' )
                ),
            ),
            'message_subject' => array(
                'type' => 'text',
                'name' => 'subject',
                'caption' => _t('_message_subject'),
                'required' => true,
                'checker' => array(
                    'func' => 'length',
                    'params' => array(5, 300),
                    'error' => _t( '_ps_ferr_incorrect_length' )
                ),
            ),
            'message_text' => array(
                'type' => 'textarea',
                'name' => 'body',
                'caption' => _t('_Message text'),
                'required' => true,
                'checker' => array(
                    'func' => 'length',
                    'params' => array(10, 5000),
                    'error' => _t( '_ps_ferr_incorrect_length' )
                ),
            ),
            'captcha' => array(
                'type' => 'captcha',
                'caption' => _t('_Enter what you see:'),
                'name' => 'securityImageValue',
                'required' => true,
                'checker' => array(
                    'func' => 'captcha',
                    'error' => _t( '_Incorrect Captcha' ),
                ),
            ),
            'submit' => array(
                'type' => 'submit',
                'name' => 'do_submit',
                'value' => _t('_Submit'),
            ),
        ),
    );

    $oForm = new BxTemplFormView($aForm);
    $oForm->initChecker();
    if ( $oForm->isSubmittedAndValid() ) {
        $sSenderName    = process_pass_data($_POST['name'], BX_TAGS_STRIP);
        $sSenderEmail    = process_pass_data($_POST['email'], BX_TAGS_STRIP);
        $sLetterSubject = process_pass_data($_POST['subject'], BX_TAGS_STRIP);
        $sLetterBody    = process_pass_data($_POST['body'], BX_TAGS_STRIP);

        $sLetterBody = $sLetterBody . "\r\n" . '============' . "\r\n" . _t('_from') . ' ' . $sSenderName . "\r\n" . 'with email ' .  $sSenderEmail;

        if (sendMail($site['email'], $sLetterSubject, $sLetterBody)) {
            $sActionKey = '_ADM_PROFILE_SEND_MSG';
        } else {
            $sActionKey = '_Email sent failed';
        }
        $sActionText = MsgBox(_t($sActionKey));
    }

    $sForm = $sActionText . $oForm->getCode();
    echo DesignBoxContent(_t('_CONTACT_H1'), $sForm, $oTemplConfig->PageCompThird_db_num);

https://www.deanbassett.com
Quote · 23 Nov 2011

Hi Deano,

Exactly what I wanted. Thanks a million, you are a star.

Regards

Charlieboa

Quote · 24 Nov 2011
 
 
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.