subject text to be auto filled out ?

I want the subject text to be auto filled out. So instead of being blank I would like the subject line to have "New Member" all ready inserted in the subject field. Can someone show me how to do this ?

Here is a part of my contact.php, I thought you could use this to show me where it would go.

'message_subject' => array(
'type' => 'text',
'name' => 'subject',
'caption' => _t('_message_subject'),
'required' => true,

 

Thank you.

Quote · 23 Oct 2010

Quite easy actually.

Add the marked line to that section of code.

'message_subject' => array(
'type' => 'text',
'name' => 'subject',
'caption' => _t('_message_subject'),
'value'=>'New Member',
'required' => true,
),

https://www.deanbassett.com
Quote · 23 Oct 2010

Can we do this in 7.1? Passing a variable would be nice, like

contact.php?subject=new member

Quote · 18 Jul 2013

Yes you can. You modify the same block of code in contact.php

Look for this.

            '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' )
                ),
            ),


Modify it to add what is marked below in green. This code will use a subject passed on the url if one is found. Else default to New Member.

            'message_subject' => array(
                'type' => 'text',
                'name' => 'subject',
                'caption' => _t('_message_subject'),
                'required' => true,
                'value' => ($_GET['subject'] == '' ? 'New Member' : urldecode($_GET['subject'])),
                'checker' => array(
                    'func' => 'length',
                    'params' => array(5, 300),
                    'error' => _t( '_ps_ferr_incorrect_length' )
                ),
            ),

https://www.deanbassett.com
Quote · 18 Jul 2013
 
 
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.