Skip to main content

Days

Hrs

Mins

Secs
Christmas / New Year Offer – 25% OFF on All Products and Plans. Coupon: NEWYEAR2025

#132 Expanded Description

Posted in ‘NorrCompetition’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information (available for public)

PHP version
ea-php82

Latest post by b2z on Thursday, 05 December 2024 14:20 EET

bizguy

To fit the client's requirements I added the following CSS to cause the Description field to wrap below the input field as it didn't in my template:

.uk-text-meta {
    display: inline-block;
}

The client has also asked that the Description length be increased to accommodate more information on how to complete the field. Could you indicate where this would be modified in the files (I am comfortable editing PHP to provide a quick fix) and possibly add this to your extension in the future so updates do not lose the modification.

Thanks.

sulpher
Hi Ed,
Could you, please, give more information about Description field? Do you mean Description of the contest or you did create a field called Description to let users filling it out during entry's submission?
Regards,
Eugene

bizguy

Hi Eugene,

I was referring to a Field's Description. The client is using NorrCompetition for Simple entries, and they want to be able to provide direction on how to complete things like multiple checkbox Fields in the form. The Field Description is limited in length. This is what I hope to expand.

b2z

Ed,

That's the limitation in the database table #__competition_fields for field description:

`description` varchar(255) NOT NULL

If you are familiar with the things like phpMyAdmin then you can try to change this field type from varchar(255) to text. This will allow to store more text in it.

It is a good idea to make it expanded in the component too, that's what we will do in the next version.

Kind regards,

Dmitrijs

bizguy

Thanks Dmitrijs!

I implemented the recommended field type change, and was able to expand the Description information. This combined with the above mentioned CSS change, has addressed their needs. 

A suggestion might be to allow safe HTML in those fields as well, so things like <br /> <ul> <li> could be included to provide formating for clarity.

Thanks for all your help here, I will provide a positive Jreview as well.

Ed

b2z

Ed,

Regarding HTML - we will think about it. As far as I remember Joomla Form allow HTML in fields description. Hope I am not wrong.

Kind regards,

Dmitrijs

b2z

Hi Ed!

I think I found a solution for you :)

Open administrator/components/com_competition/models/forms/field.xml and find this code (lines 89-96):

<field
    name="description"
    type="nc.fielddescription"
    rows="4"
    label="COM_COMPETITION_FIELD_CUSTOM_DESCRIPTION_LABEL"
    description="COM_COMPETITION_FIELD_CUSTOM_DESCRIPTION_DESC"
/>

Change to this code:

<field
    name="description"
    type="nc.fielddescription"
    rows="4"
    label="COM_COMPETITION_FIELD_CUSTOM_DESCRIPTION_LABEL"
    description="COM_COMPETITION_FIELD_CUSTOM_DESCRIPTION_DESC"
    filter="safehtml"
/>

Did it help?

Kind regards,

Dmitrijs

sulpher
Hi Ed,
Should we close this ticket as a resolved?

b2z

Hi Ed!

This was added in version 2.0.7.

Should you still experience problems, please open a new support thread.

We would be grateful if you leave a review about our extension at the JED.

https://extensions.joomla.org/extension/norrcompetition/

Kind regards,

Dmitrijs

Support information

Support hours: You can get our help: Monday - Friday / 09:00 to 17:00 (GMT+3), but not limited. Our staff is pleased to provide Premium support to every paid subscriber asap, but sometimes you should be ready to wait for our reply for up to 3 days.


Our time: / Your time:

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. We also ask you to remove temporary credentials at your site after the problem is resolved. Thank you.

Support of free extensions is not provided on this forum. Please submit your questions or report issues via Github tracker. See link on the product page.