• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: How to check a checkbox by default

How to check a checkbox by default 11 years 7 months ago #19327

  • sweker
  • sweker's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Frustrated with one of the new support guys when logging a ticket, as he isn't providing much support. Therefore I'll turn to the forum for help! Love the product BTW, not crazy about the support, previous contacts were awesome...

In the "edit.php", I would like to have some of the check boxes marked with a check automatically. I found out how to do it with this line of code (see in RED) by changing it from 0 to 1;
<p>
<input type="checkbox" name="options[enable_rating]" id="enable_rating" value="1" <?php echo (isset($this->options) && $this->options == 0) ? 'checked="checked"' : ''; ?> />
<label for="enable_rating" class="rs_inline"><?php echo JText::_('RSEPRO_ENABLE_EVENT_RATING'); ?></label>
</p>

However, I can't figure out how to do it with the following line of code. Any help would be appreciated as support feels this is customization, and has essentially said it's too difficult.
<p>
<input id="automatically_approve" name="event[automatically_approve]" type="checkbox" value="1" class="rs_check" <?php echo $this->row->automatically_approve ? 'checked="checked"' : ''; ?> />
<label for="automatically_approve" class="rs_inline"><?php echo JText::_('RSEPRO_EVENT_AAPROVE'); ?></label>
</p>

Thank you! Steve
The administrator has disabled public write access.

How to check a checkbox by default 10 years 11 months ago #23611

  • pnutster
  • pnutster's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
I was checking that too, but it is the wrong file to set default event options on/ off

The file you want to change is: /components/com_rseventspro/helpers/events.php

Around line 189 you will find:

Code display:
function getDefaultOptions()
	{
		return array('enable_rating' => 0,
		'enable_fb_like' => 1,
		'enable_twitter' => 1,
		'enable_gplus' => 1,
		'start_date' => 1,
		'end_date' => 1,
		'show_description' =>1,
		'show_location' => 1,
		'show_categories' => 1,
		'show_tags' => 1,
		'show_files' => 1,
		'show_contact' => 1,
		'show_map' => 1,
		'show_export' => 1,
		'show_invite' => 1,
		'show_postedby' => 0,
		'show_repeats' => 1);
	}

Change 1's to 0's for default off.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!