Copied to clipboard

Flag this post as spam?

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


  • Phill 115 posts 289 karma points
    Jan 18, 2014 @ 00:31
    Phill
    0

    v7 Possible to set default field values yet?

    I've got a custom handler for ContentService.Saving of an object, I'd like to be able to set the default values for some DocType fields when the node is first created. I've looked around and seen metion that it wasn't possible in 7.0.0 but should be by 7.0.1 . I'm currently running the latest nightly of 7.0.2 and am wondering if someone could point me in the right direction to either docs or a sample bit of code?

    Any help is greatly appreciated.

    Regards,

    Phill

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jan 19, 2014 @ 10:55
    Jeroen Breuer
    0

    Hello,

    Do you mean something like the Standerd Values packages, but than for v7? I don't think that's possible yet. 

    Jeroen

  • Phill 115 posts 289 karma points
    Jan 20, 2014 @ 15:48
    Phill
    0

    Hi Jeroen,

    A package that does the job would be nice but I was even thinking of something like Application Handler like "ContentService.Creating += ContentService_Creating;" but we're not supposed to use that, and Saving seems to happen too late in the process or doesn't get wired to the js/control correctly. In particular, I'm looking to see if a DateTime filed has a value set when a new node is created, if not set it to DateTime.Now.

    Phill

Please Sign in or register to post replies

Write your reply to:

Draft