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.

Prefilled Custom fields

October 09, 2008 7:37am

Subscribe [3]
  • #1 / Oct 09, 2008 7:37am

    MartijnM

    5 posts

    Can i prefill, for example the title field with:
    “2008 - week 28”
    So when the author makes a new entry, the title field is filled
    with: “{current year} - week {current week number}”

    Or for example:
    “John Doe’s ramblings”
    So when the author makes a new entry, the title field is filled
    with: “{current user's name}‘s ramblings”

  • #2 / Oct 09, 2008 8:06am

    Ingmar

    29245 posts

    I suppose that could work, perhaps using PHP, in a so-called Stand Alone Entry Form. It would be more difficult for the backend, although an extension could probably do it.

  • #3 / Oct 09, 2008 8:10am

    MartijnM

    5 posts

    Yeah, thought so 😊

    Is there a barebone minimum extension where i can hack away in?

    The “file” extension does kinda the same thing, will start there i guess.

  • #4 / Oct 09, 2008 8:35am

    Mark Bowen

    12637 posts

    Hi MartijnM,

    Don’t know if this will help at all but Robin has an extension called Static Field Extension which does this sort of thing. Well it doesn’t put the data in that you are asking after but it does put something in. Might be a start at least?

    This is mainly for custom fields from what I remember but it might give an idea of how to go about doing it for the title field though.

    Hope that helps.

    Best wishes,

    Mark

  • #5 / Oct 10, 2008 7:16am

    MartijnM

    5 posts

    Thx, it helped alot, BUT:

    publish_form_field_text_input hook doesn’t work on the title field

    :-( back to square one

  • #6 / Oct 10, 2008 7:50am

    Mark Bowen

    12637 posts

    Just as a quick note you could definitely do this if you used a SAEF and some PHP in the template to give what you need. Would that work at all?

    Best wishes,

    Mark

  • #7 / Oct 10, 2008 9:39am

    MartijnM

    5 posts

    That would work, but how easy is it to insert a
    SAEF into the CP publish, with the same look and feel?

    So basicly replace the standard entry form, but with the same
    options, so a normal administrator wouldn’t even notice?

  • #8 / Oct 10, 2008 10:23am

    Ingmar

    29245 posts

    It’s relatively easy to copy the look & feel, but you wan’t integrate an SEAF into the CP, it’d be a regular template.

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

ExpressionEngine News!

#eecms, #events, #releases