Remove Required in Events

Hi, I am new and trying to figure things out.  I am trying to remove the required field function from events.  I want to leave the field just remove the required part.  I found a few suggestions in this forum and I tired them but they did not create the solution.  It removed the * and the error message but the the field was still required to fill in before it would post.  Again, I do not want to remove the field just the requirement to fill it right then before it will post.  Seems this has been a problem for some time, just hoping someone has created a solution.

Quote · 7 Jun 2015

Only two things are need for this :

1) Replace 'required' => true with 'required' => false

2) Remove the checker portion

B.T.W, which specific field are you referring to ?

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

The only field I want mandatory is the Title.  Thanks for your suggestion but, unfortunately,  it didn't work.  Got this message when I tried it -- Parse error: syntax error, unexpected ',' in /hsphere/local/home/me/website.com/modules/boonex/events/classes/BxEventsFormAdd.php on line 202

Earlier I tried changing true to false and it did remove the * but did not remove the requirement to fill in. 

Quote · 7 Jun 2015

Attach a copy of the changed file here so I can point out what you did wrong.

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

This is what I put in after following your directions. 

 

  ),
                'Description' => array(
                    'type' => 'textarea',
                    'name' => 'Description',
                    'caption' => _t('_bx_events_caption_desc'),
                    'required' => false,
                    'html' => 2,
                        'func' => 'length',
                        'params' => array(20,64000),
                        'error' => _t ('_bx_events_err_desc'),
                    ),
                    'db' => array (
                        'pass' => 'XssHtml',
                    ),
                ),
                'Country' => array(
                    'type' => 'select',
                    'name' => 'Country',
                    'caption' => _t('_bx_events_caption_country'),
                    'values' => $aCountries,
                    'required' => false,
                        'func' => 'preg',
                        'params' => array('/^[a-zA-Z]{2}$/'),
                        'error' => _t ('_bx_events_err_country'),
                    ),
                    'db' => array (
                        'pass' => 'Preg',
                        'params' => array('/([a-zA-Z]{2})/'),
                    ),
                ),          THIS IS LINE 202
                'City' => array(
                    'type' => 'text',
                    'name' => 'City',
                    'caption' => _t('_bx_events_caption_city'),
                    'required' => false,
                        'func' => 'length',
                        'params' => array(3,50),
                        'error' => _t ('_bx_events_err_city'),
                    ),
                    'db' => array (
                        'pass' => 'Xss',
                    ),
                ),
                'Place' => array(
                    'type' => 'text',
                    'name' => 'Place',
                    'caption' => _t('_bx_events_caption_place'),
                    'required' => false,
                        'func' => 'avail',
                        'error' => _t ('_bx_events_err_place'),
                    ),
                    'db' => array (
                        'pass' => 'Xss',
                    ),
                ),
                'EventStart' => array(
                    'type' => 'datetime',
                    'name' => 'EventStart',
                    'caption' => _t('_bx_events_caption_event_start'),
                    'required' => false,
                        'func' => 'DateTime',
                        'error' => _t ('_bx_events_err_event_start'),
                    ),
                    'db' => array (
                        'pass' => 'DateTime',
                    ),
                    'display' => 'filterDate',
                ),
                'EventEnd' => array(
                    'type' => 'datetime',
                    'name' => 'EventEnd',
                    'caption' => _t('_bx_events_caption_event_end'),
                    'required' => false,
                        'func' => 'DateTime',
                        'error' => _t ('_bx_events_err_event_end'),
                    ),
                    'db' => array (
                        'pass' => 'DateTime',
                    ),
                    'display' => 'filterDate',
                ),
                'Tags' => array(
                    'type' => 'text',
                    'name' => 'Tags',
                    'caption' => _t('_Tags'),
                    'info' => _t('_sys_tags_note'),
                    'required' => false,
                        'func' => 'avail',
                        'error' => _t ('_bx_events_err_tags'),
                    ),
                    'db' => array (
                        'pass' => 'Tags',
                    ),
                ),
 
                'Categories' => $oCategories->getGroupChooser ('bx_events', (int)$iProfileId, true),
 
          
Quote · 7 Jun 2015

For the "checker", you need to remove the full block, not just the one line. For example, for Country, remove this block of code :

                    'checker' => array (
                        'func' => 'preg',
                        'params' => array('/^[a-zA-Z]{2}$/'),
                        'error' => _t ('_bx_events_err_country'),
                    ),
Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 7 Jun 2015

It WORKS!!!!  Thank you.

Just wondering if I would mess anything up by removing Categories since it doesn't have the same script as the others and I can't disable and don't really need it.

Quote · 7 Jun 2015

Well just remove it and check and if there is any issue you put it back :)

It WORKS!!!!  Thank you.

Just wondering if I would mess anything up by removing Categories since it doesn't have the same script as the others and I can't disable and don't really need it.

 

Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 9 Jun 2015
 
 
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.