Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: maxlength for event title

maxlength for event title 4 months 2 days ago #26160

  • hekla
  • hekla's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 148
  • Karma: 8
  • Thank you received: 75
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
<input type="text" name="jform[title]" id="jform_title"  value="" class="inputbox required" size="40" required aria-required="true" />
to get:
<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
JEM 2.2.3 / JEM 2.2.3 with core mods (custom fields) / 2.3dev (Egnarts Version)
Joomla always up to date
php 7.2/7.3

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

Last edit: by hekla. Reason: added ps.

maxlength for event title 4 months 22 hours 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"
<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_comp...rom_the_Joomla!_core

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

Last edit: by depebo.
  • Page:
  • 1
Time to create page: 0.192 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......