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.

Custom fields are being parsed when they're hidden.

November 09, 2011 9:30am

Subscribe [3]
  • #1 / Nov 09, 2011 9:30am

    Here is the situation:

    I have one big custom field group for all my channels.
    In of my channels I used a custom color picker field.

    In my other channels I don’t need it, so I just hide it with the custom publish page layout tool.
    Problem is, when the field is empty if you submit your entry it throws an error.
    Even if the field is hidden !

    And since the field is hidden you don’t actually see the error, which makes it very hard to figure out what’s happening.

    So, wouldn’t it make more sense to make sure that when you submit an entry only the visible fields are being parsed ?

  • #2 / Nov 09, 2011 10:33am

    Mark Bowen

    12637 posts

    Hi Jan,

    I don’t know what Fieldtype you’re using there for your color picker but does it possibly have Required set in the field settings? If so then it doesn’t matter if the field is hidden or not as I believe that will still come into play here.

    You probably wouldn’t want to be hiding a required field anyway.

    As I say though, not sure if that’s your problem here as I don’t know which Fieldtype you’re using here.

    Best wishes,

    Mark

  • #3 / Nov 09, 2011 10:42am

    does it possibly have Required set in the field settings?

    nope

    If so then it doesn’t matter if the field is hidden or not as I believe that will still come into play here.

    You probably wouldn’t want to be hiding a required field anyway.

    I disagree, a field could perfectly be required in 1 channel, and not needed in another channel.
    It should only check if a field is required when it’s visible.

     

  • #4 / Nov 09, 2011 10:47am

    Mark Bowen

    12637 posts

    Well we’ll have to agree to disagree on the second point there 😉 however the fact that it isn’t set as required is a little weird and probably something you’d need to take up with the Fieldtype creator as it’s a 3rd party add-on you’re using here.

    Also what is the error you are seeing. Sorry I had read your first post as though you were getting the field is required message but I see now that you hadn’t actually mentioned what sort of error you were getting here.

    Is it a field required message you are getting or something else here? If the former then the add-on owner would need to look into that. If some other error message then you may still need to go to the author as it would very possibly be something wrong with their add-on but just wanted to check to see if it’s maybe an ExpressionEngine error which might give a bit more information on all of this.

    Best wishes,

    Mark

  • #5 / Nov 09, 2011 10:59am

    Also what is the error you are seeing. Sorry I had read your first post as though you were getting the field is required message but I see now that you hadn’t actually mentioned what sort of error you were getting here.

    Is it a field required message you are getting or something else here? If the former then the add-on owner would need to look into that. If some other error message then you may still need to go to the author as it would very possibly be something wrong with their add-on but just wanted to check to see if it’s maybe an ExpressionEngine error which might give a bit more information on all of this.

    Here is a screenshot of the error:
    http://d.pr/y3xX

    ( plugin can be found here: http://www.jaspaul.com/downloads/color-field-expression-engine-2.html )

    It’s obviously a plugin specific error ( and I already disabled it by editing the code of the add-on )
    So everything work over here, I just think it doesn’t make much sense to allow custom fields to run a validation check when they’re hidden.

    Well we’ll have to agree to disagree on the second point there 😉

    Then how would you make a custom field required for 1 channel, and hide it in another channel ? ( using the master-field-group approach )

  • #6 / Nov 10, 2011 3:43am

    John Henry Donovan

    12339 posts

    Hi Jan,

    glad you had the know-how to edit the plugin and sort it out.

    Then how would you make a custom field required for 1 channel, and hide it in another channel ? ( using the master-field-group approach )

    At the moment you wouldn’t. You would have to make two field groups. You are welcome to make a feature request though

    I also remember an add-on that revealed error messages for hidden fields being available on devot-ee.com. Can;t recall the name right now though

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

ExpressionEngine News!

#eecms, #events, #releases