ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Customize when Extended Text is required

March 06, 2009 3:24pm

Subscribe [3]
  • #1 / Mar 06, 2009 3:24pm

    tsoares

    114 posts

    Hi,

    I like to make Extended Text is not required when the YouTube embed code is in the “Body” field.

    YouTube embed code as an example:

    <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/58qEJgXGTFs&hl=en&fs=1"></param></param></param><embed src="http://www.youtube.com/v/58qEJgXGTFs&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

    All other times Extended Text is required.

    Pls tell me which EE system programs needs to modify to implement this request.

    Thanks.

  • #2 / Mar 07, 2009 11:31am

    Boyink!

    5011 posts

    This isn’t possible with out of the box EE—a field is either required or not, and can’t be set to be dependent on another field for that setting.

    You’d have to write a custom extension to create this behavior.

    You could put field-level instructions in to help the person entering the content.

    I’d probably create a specific field for the YouTube code—that way I could put logic at the template level that would choose to display the entry or not based on it being filled in correctly.

  • #3 / Mar 07, 2009 11:53am

    grrramps

    2219 posts

    You could put field-level instructions in to help the person entering the content.

    I’d probably create a specific field for the YouTube code—that way I could put logic at the template level that would choose to display the entry or not based on it being filled in correctly.

    I’ve had that same issue crop up a few times, too, and found it’s better to follow Boyink’s advice. If you use plenty of YouTube videos, consider creating a field specifically for the code, and make sure to display the Field Instructions for the user. The danger, of course, is that any user can plunk down additional content in other fields, whether authorized, unintentional.

    Otherwise, and assuming that the YouTube video code must always be in the Body text, just give explicit instructions for usage.

  • #4 / Mar 09, 2009 9:18pm

    tsoares

    114 posts

    Thanks for sharing ideas. I will run these options by my team.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases