Events Module

Can anyone advise me on whether or not I am able to choose which fields I want to be mandatory, with the events module? Right now, there's fields, like city and country, that are required fields. I would like to change that. Anyone know how?

Best Regards,
Quote · 27 Jul 2013

If Google search results are important then you may want to rethink it. If your members are from different areas and you want your dolphin to present local events to them even if they did not input them, you again may want to rethink it. If not and you still want to make those fields non mandatory, then take a look at BxEventsFormAdd.php  in the public_html/modules/boonex/events/inc/classes.

Vunderba..... Challenge Yourself to be the Best...... Hosting from Zarconia.net
Quote · 27 Jul 2013

Hi Itsawhiz:

Thanks for the response and info. I'll think over the things you've mentioned. I found it to be cumbersome, because the only events I planned on promoting on my site are "virtual" events.

If I still decide to make them non mandatory, I'll use your suggestion, and let you know my experience. Thanks again. 

Best Regards,
Quote · 27 Jul 2013

See an example below to remove Country as mandatory. You can look in the file for the other fields and do likewise.

In modules\boonex\events\classes\BxEventsFormAdd.php , remove the highlighted code snippets.

                'Country' => array(

                    'type' => 'select',

                    'name' => 'Country',

                    'caption' => _t('_bx_events_caption_country'),

                    'values' => $aCountries,

                    'required' => true,

                    'checker' => array (

                        'func' => 'preg',

                        'params' => array('/^[a-zA-Z]{2}$/'),

                        'error' => _t ('_bx_events_err_country'),

                    ),

                    'db' => array (

                        'pass' => 'Preg',

                        'params' => array('/([a-zA-Z]{2})/'),

                    ),

                ),

Can anyone advise me on whether or not I am able to choose which fields I want to be mandatory, with the events module? Right now, there's fields, like city and country, that are required fields. I would like to change that. Anyone know how?

 

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

Hi modazz,

Thanks for your reply.

I applied what you suggested and that took care of it. I appreciate it.

One quick question, if you don't mind. How do I get rid of the drop down menu for the "country' field? It's no longer mandatory, but a country still appears, even without selecting one.

Is there a way I can make the menu function to not display a country, unless desired? Or would I just have to remove the drop down entirely, and manually enter a country if I wanted to?  

Thanks again.

Best Regards,
Quote · 11 Aug 2013

In modules\boonex\events\classes\BxEventsFormAdd.php

 

Find :

        $oProfileFields = new BxDolProfileFields(0);

        $aCountries = $oProfileFields->convertValues4Input('#!Country');

        asort($aCountries);

 

Replace with :

 

$oProfileFields = new BxDolProfileFields(0);

$aDefCountries = $oProfileFields->convertValues4Input('#!Country');

asort($aDefCountries);

$aChooseCountries = array(''=>_t("_Select"));   

$aCountries = array_merge($aChooseCountries, $aDefCountries);

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

Hi modazz,

I made the changes you suggested and it did the trick. 

Thanks again.

Best Regards,
Quote · 12 Aug 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.