Hi,

Does it possible to define a max length only for the teaser (summary) in "text with summary field.
I think this is a very important feature.

Regards
Aleanar

Comments

dawehner’s picture

StatusFileSize
new4.16 KB

Here is the current progress on the issue.

Coupon Code Swap’s picture

I tried adding the patch and it does add some settings but isn't working. How's the progress so far? Will this allow to attach Maxlength only to the summary and not the body?

schnitzel’s picture

Status: Active » Closed (duplicate)

This is for the unsupported 2.x version, you should upgrade to the 3.x

dup of: #1306562: Word Count for summary field in D7

dixon_’s picture

Status: Closed (duplicate) » Needs review

Actually, I will put the other post as duplicate since this issue actually contains a patch that otherwise will get lost.

I will hopefully have reasons to test and finalize the patch in #1 soon.

nagy.balint’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
StatusFileSize
new5.17 KB

I had to rewrite the _maxlength_children function almost completely, but i managed to solve this issue.

Might need to work on the UI, but basically when its a text with summary, now you can specify a maxlength, and a label. And it works independently from the main text's maxlength and label. So it is possible to have maxlength on summary only.

Tunox’s picture

Tested the patch provided in #5 and it works fine on a local sandbox.
Is there any hope to see this integrated in the 3.x stable release?

Edit: I just noticed that for non-english sites the summary countdown message:
Content limited to @limit characters, remaining: <strong>@remaining</strong>
is not being translated. Even an added custom message is not being taken into consideration which suggests this isn't an translation issue. Maybe the newly added default values for the summary field in this patch aren't being rendered.

dlg0’s picture

Just applied the patch in #5

cd sites/all/modules/maxlength
patch -p1 < maxlength-summary-1247250-5.patch

and it works great.

Thanks a lot!

havran’s picture

Patch from #5 works great. Maybe we need add checkboxes Force text truncate and Truncate html for summary field too?

vincenzo’s picture

Any chance this will ever be consider for merging?
I can amend it if it's required to.

jOksanen’s picture

Status: Needs review » Reviewed & tested by the community

After 4 succesfull tests + me, im marking as tested by community.

kylahuff’s picture

Just letting you know that I have also tested and worked a treat.
Thanks

aron novak’s picture

Status: Reviewed & tested by the community » Fixed

#5 is committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.