Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Murray Roke 503 posts 966 karma points c-trib
    Apr 07, 2009 @ 05:16
    Murray Roke
    0

    ActionHandler > BeforeSave ... BeforeValidate?

    Hi all
    I have a custom BeforeSave action for a field.
    The field is used to paste youtube video links.
    The action strips the field down to just the youtubeID

    this all works fine, but I have 2 problems.
    1) it dos not show the 'corrected' value in the post-save state, you have to re-load the pane for it to show.

    2) validation occurs before the action handler... so if the action handler can't find a YouTubeID it blanks the field... the field is not subsequently validated as a required field, and a blank field is saved.

    Perhaps there's another way to do this?
    Any advice welcome.
    Cheers.
    Murray.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Apr 07, 2009 @ 08:46
    Richard Soeteman
    0

    Hi Murray,

    This behaviour is because Validation is done Client side and the action is done server side so that will not work also your page will not be refreshed so you don't see the update. Tim posted an article a while back that is using Macro's to strip out the Id Maybe that is a better solution?

    Cheers,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft