LiveWhale

Welcome, Guest Login

Support Center

How do I make a category required?

Last Updated: Jul 10, 2017 11:49AM PDT

Your Question


Can we make the event categories section required?

Our Answer


Yes,  you can make a field required by performing the following steps. 
  • Login to the backend with your SFTP credentials into the LiveWhale server
  • Go to the following configuration file: /[webroot]/livewhale/client/private.config.php
  • Add the following code to make a field required
$_LW->REGISTERED_MODULES['events']['data_types']['events']['fields_required'][]='categories';

Note the structure of this line of code. 'events' is the content type that is used to target the events form. You can replace this with any of the content types such as, news, profiles, public (submission), etc..‚Äč The other part that you would need to revise is the field to require (ie., 'categories'). 

Below are a couple more examples:

$_LW->REGISTERED_MODULES['events']['data_types']['events']['fields_required'][]='summary';
$_LW->REGISTERED_MODULES['events']['data_types']['events']['fields_required'][]='description';
$_LW->REGISTERED_MODULES['events']['data_types']['events']['fields_required'][]='location';
$_LW->REGISTERED_MODULES['events']['data_types']['events']['fields_required'][]='contact_info';

eb8f96c071020d8b0923da726d6cab65@livewhale.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete