help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

maxlength for event title

maxlength for event title

5 years 6 months ago - 5 years 6 months ago
#26160
Hi there,

I'm looking for a solution to limit the input length for the title of events (not the length of the output – this is possible in the settings).
If somehow possible with an override and without core hack.

I would like to add the maxlength HTML attribut to the input tag in
Code:
<input type="text" name="jform[title]" id="jform_title" value="" class="inputbox required" size="40" required aria-required="true" />
to get:
Code:
<input type="text" name="jform[title]" id="jform_title" value="" class="inputbox required" size="40" required aria-required="true" maxlength="90" />

I couldn't figure out where the input filed is generated … :(

Help is appreciated :)

hekla

ps. Yes, I did a forum search and there are older posts on this topic, but all relating to eventlist and from 7 yrs ago
Last edit: 5 years 6 months ago by hekla. Reason: added ps.

Please Log in or Create an account to join the conversation.

Re: maxlength for event title

5 years 6 months ago - 5 years 6 months ago
#26161
Not sure if you can override a JEM model, but if you willing to hack core JEM you are looking for event.xml file in administrator\components\com_jem\models\forms\ (backend event edit) and components\com_jem\models\forms\event.xml (frontend event edit) folders.
Find field name title (around line 28 or 18) and add maxlength="90"
Code:
<field name="title" type="text" class="inputbox" size="40" label="COM_JEM_EVENT_TITLE" description="COM_JEM_EVENT_TITLE" required="true" maxlength="90" />

EDIT: Have a look at this extension if you want to override JEM. I think it allows to override forms as well (have not tried myself)
gruz.ml/en/extensions/mvcoverride.html
It was referenced from Joomla! Docs docs.joomla.org/How_to_override_the_component_mvc_from_the_Joomla!_core
Last edit: 5 years 6 months ago by depebo.

Please Log in or Create an account to join the conversation.

Time to create page: 0.426 seconds