Custom Fields
Re-Envisioned
Support Meta Box Builder Character Limit on Textarea

This topic contains 6 replies, has 2 voices, and was last updated by  cmcmahon 2 years, 3 months ago.

  • Creator
    Topic
  • #4247
    Resolved
    cmcmahon
    Participant

    Any way, when using the builder, to limit the length of content in a textarea?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #4259

    Anh Tran
    Keymaster

    Yes, you can. You need to install the plugin Text Limiter first, then follow this guide to add rules to the field using custom attribute:

    https://metabox.io/docs/meta-box-builder/#section-custom-attributes

    #4340

    cmcmahon
    Participant

    Ahn,

    I’ve set the limit to 1500, the admin area is allowing 1500 but the front end is only displaying 1491.

    #4341

    Anh Tran
    Keymaster

    Hi, the plugin doesn’t restrict on the content length displayed in the front end. It might be your PHP function that gets the content and displays it. Please check this.

    #4345

    cmcmahon
    Participant

    I’m just using https://www.cincinnatidesignawards.com/wp-admin/admin.php?page=esb-cie-import-export-page to return the content. Nothing custom or fancy.

    #4352

    Anh Tran
    Keymaster

    I can’t access that page. It’s your internal admin page. So, the problem is how that page exports/imports content. I think it doesn’t relates to Meta Box. Please try deactivate the text limiter extension and try again.

    #4401

    cmcmahon
    Participant

    I removed the limit (screen shot of metabox before removal) https://www.dropbox.com/s/4ywihsueg8nw74l/Screenshot%202016-10-30%2015.43.45.png?dl=0) from the textarea metabox and refreshed the post (did not reserve the post itself) and now all 1500 characters are being displayed (before is was omitting the last 5-60 characters).

    Somehow limit is effecting the output of echo rwmb_meta( ‘entry_narative’);

    For now, removing the limit is fine on this project as we are past the point of accepting submissions. Just hate to see it affect anyone else.

    Thanks, always appreciate the fast replies and constant improvement in the plugins.

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.