• 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: Modify the Required input Asterisk

This message has been removed by user's request. 9 years 3 months ago #29905

  • 74d285022e73632c358b622a2bd330cd
  • 74d285022e73632c358b622a2bd330cd's Avatar
This message has been removed by user's request.
The administrator has disabled public write access.

Modify the Required input Asterisk 8 years 10 months ago #31493

  • omarfilip
  • omarfilip's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 1
@gjutras, did you find an answer to this? I have the same issue.
The administrator has disabled public write access.

Modify the Required input Asterisk 8 years 10 months ago #31509

  • bogdan.tataru
  • bogdan.tataru's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 174
  • Thank you received: 40
In order to achieve this you will have to edit the default.php file on the following location: /components/com_rsmembership/views/subscribe/tmpl/ and search for <?php echo JText::_('COM_RSMEMBERSHIP_REQUIRED'); ?>.

Note that you will have to keep a changelog for this file due to the fact that any changes will be lost when a component update is performed.

Also, note that you can replace the "(*)" symbol with a desired one through a language override by following these steps:

1. Head to Extensions > Language Manager > Overrides
2. select your language in the Filter dropdown (for example English)
3. click on New
4. add "COM_RSMEMBERSHIP_REQUIRED" in the Language Constant field
5. change the "(*)" with the desired symbol in the "Text" field
6. click on Save or Save & Close

More on this here:

www.rsjoomla.com/support/documentation/g...guage-overrides.html
My help is not official customer support. To receive assistance, submit a ticket by clicking here
The administrator has disabled public write access.
The following user(s) said Thank You: omarfilip

Modify the Required input Asterisk 8 years 8 months ago #32109

  • omarfilip
  • omarfilip's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 1
Here is a better way that doesn't involve the component files - just CSS. Place it in the custom.css file.

.rsmembership_form_table input {
	display: inline;
	}
The administrator has disabled public write access.

Modify the Required input Asterisk 7 years 7 months ago #35813

  • mylo
  • mylo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 3
bogdan.tataru wrote:
In order to achieve this you will have to edit the default.php file on the following location: /components/com_rsmembership/views/subscribe/tmpl/ and search for <?php echo JText::_('COM_RSMEMBERSHIP_REQUIRED'); ?>.

Note that you will have to keep a changelog for this file due to the fact that any changes will be lost when a component update is performed.

You can achieve this using a component overrride - docs.joomla.org/Understanding_Output_Overrides
When you update, your changes won't be lost, but you'll need to compare the new file to your overriden file to make sure there weren't changes beyond the formatting that you already had.

But that doesn't work on Custom Fields. The code for outputting the custom fields is in the file mentioned, but the formatting isn't there. So I looked in (I think) every file that is in the 'com_rsmembership' folder and couldn't find anything that was formatting these fields and adding the asterisk for required fields in a similar manner as '/components/com_rsmembership/views/subscribe/tmpl/default.php'.

Does anyone know where I can find the formatting info so I can override it?
Last Edit: 7 years 7 months ago by mylo.
The administrator has disabled public write access.

Modify the Required input Asterisk 7 years 6 months ago #35865

  • mylo
  • mylo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 3
Found it!

Locate this: /administrator/components/com_rsmembership/helpers/helper.php
Create an override (see previous reply with a link to Joomla's how-to)

Find line 584:
$name_field = ( $type=='user' ? 'rsm_fields' : 'rsm_membership_fields');

Just after it, you will replace this code:
               <-- this is a blank line
$return = array();
$return[0] = '<label title="'.JText::_($field->label).'" class="hasTip" for="rsm_'.$field->name.'" id="jform_'.$field->name.'-lbl">'.JText::_($field->label).'</label>';

... with this new code:
$required_designator = JText::_('COM_RSMEMBERSHIP_REQUIRED');
$return = array();
$return[0] = '<label title="'.JText::_($field->label).'" class="hasTip" for="rsm_'.$field->name.'" id="jform_'.$field->name.'-lbl">'.JText::_($field->label).':'.$required_designator.'</label>';

Because of the way the single and double quotes were used in the $return[0] string, I had to assign JText::_('COM_RSMEMBERSHIP_REQUIRED') to a variable name. I also add a colon ( : ) after the label wording so that these custom fields were formatted the same as the other fields.
The administrator has disabled public write access.

Modify the Required input Asterisk 6 years 6 months ago #37450

Hi there,

Sorry for the really late reply, but I was wondering if you know how to remove the (*) that displays after the custom fields?

Your code adds the (*) to the label, but how do I remove the one that is displayed after the custom field?

Thanks
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!