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.

Pre-populating SAEFs

August 05, 2011 2:53pm

Subscribe [2]
  • #1 / Aug 05, 2011 2:53pm

    Yvonne Martinsson

    204 posts

    In earlier versions of EE (EE1.6x)it was possible to pre-populate SAEFs with the weblog:entries_form by wrapping it in an ordinary weblog:entries tag or by using some PHP. The URL would trigger the data needed for pre-populating. Neither of these methods work with SafeCracker.The logic is different now as SafeCracker sees an edit form if an entry_id is added to the URL. Does anyone have a workaround for this?

  • #2 / Aug 05, 2011 5:57pm

    Rob Sanchez

    335 posts

    You can actually supply a url_title to SafeCracker in place of an entry_id:

    {exp:safecracker url_title="{segment_3}"}
  • #3 / Aug 06, 2011 4:38am

    Yvonne Martinsson

    204 posts

    Thanks for answering Rob. But the thing is that I need to pass an entry_id or url_title to an existant entry in order to use its data to pre-populate the stand-alone entry form. Whenever I try to that, SafeCracker stops functioning.

    Another issue is pre-populating SafeCracker by using PHP. I have a snippet of PHP code to dynamically set expiration date. Worked before. SafeCracker doesn’t parse the PHP though but prints the php code. I tested by putting the PHP in a Snippet if it has do with parsing order, but it still doesn’t work.

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

ExpressionEngine News!

#eecms, #events, #releases