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.

SAEF preview not working

August 11, 2008 7:49am

Subscribe [3]
  • #1 / Aug 11, 2008 7:49am

    SFU Surrey

    61 posts

    I am trying to customize the preview section of the SAEF to preview how the entries will look on the site. I have some conditional statements for some of the entries. When I try to preview my entries these conditional statements and the entry date format don’t appear.

    Also the entry date format doesn’t work and just displays the code like so: {entry_date format="%F %d %Y "}

    Can these items not be customized for the preview tag or is there a special way to do this?

  • #2 / Aug 11, 2008 10:14am

    Robin Sowell

    13255 posts

    I’ve never attempted to use conditionals in the preview- if you ditch the conditionals, does the entry date show for you that way?  And what build/version are you running?

    (Note- if I want to give a fully formated preview, I tend to just publish it (perhaps to a closed status) and then treat it as an edit.  I tend to have a number of plugins in play, so it’s rare I could expect a SAEF preview to really accurately show what the finished product looks like.)

  • #3 / Aug 11, 2008 9:50pm

    SFU Surrey

    61 posts

    No even if I remove the conditionals the date form still doesn’t work. I’m running v. 1.6.4, Build:  20080626

    Oh one other thing I’m running the js calendar on my form. Could this be why?

    How do I make SAEF publish to a closed status? Where can I set that, and then how can I turn it back to an open status in the backend?

  • #4 / Aug 11, 2008 9:54pm

    Sue Crocker

    26054 posts

    SFU Surrey, you can hard code that status to closed. Take a look at the rendered template from your regular SAEF form, and only have that value for status.

    You can turn the status back to open or whatever from the back end. You can filter by status there.

  • #5 / Aug 13, 2008 2:41am

    SFU Surrey

    61 posts

    Ok, somehow that works.
    However I have another issue with the SAEF. When a user submits a form which returns some type of error when they return back to the original form the content all disappears. Is there a way to avoid this?

  • #6 / Aug 13, 2008 11:05am

    Robin Sowell

    13255 posts

    Is it the stock error message?  And- does this happen to you?  I believe it’s a browser related issue and EE may not have any control over it.  (It’s never been an issue for me.)  But let’s make sure.

  • #7 / Aug 15, 2008 12:48am

    SFU Surrey

    61 posts

    Yeah I believe it is the stock error message it says :

    The following errors were encountered

      * The following field is required: Event Description

    Return to Previous Page

    so when I click on “return to previous page” all the content disappears. I am using Firefox and IE, so I’m not sure if its a browser issue.

  • #8 / Aug 15, 2008 10:15pm

    SFU Surrey

    61 posts

    One of the problems with the closed status entry for a preview, is how do I allow users to go back and edit their posting if they’ve made a mistake?
    I have the preview page on a separate page, is it better to include it on the same page?

  • #9 / Aug 17, 2008 8:56pm

    Robin Sowell

    13255 posts

    Hm- want to pm me login info- then point me to your SAEF so I can try to post- see it in action?  I’d like to eliminate the possibility that it’s browser dependent.  (Like I say- I haven’t had trouble doing it.)

    For the SAEF, I generally put the preview on the same template if it’s a simple form.  For complex forms where I use ‘edit’ rather than preview, it’s not an issue.  Oh- and re: closed status?  I create a ‘mini-cp’ for folks- use the username=“CURRENT_USER” parameter to show them their entries- and the status param to show closed entries.  And they can then select even closed entries to edit.

  • #10 / Aug 19, 2008 11:41pm

    Robin Sowell

    13255 posts

    Just an update.  I replicate- hit the ‘back’ after submitting w/no title and getting the error and I lose the field data.  What’s particularly odd- did a test template with a purely stock SAEF on it and it still loses the data.  Copy/paste the exact same form- just tweak weblog and return- and it keeps the values.

    So- need to do some more digging.

  • #11 / Aug 20, 2008 1:34am

    SFU Surrey

    61 posts

    hmm Strange. Thanks so much for looking into this.

  • #12 / Aug 20, 2008 4:46am

    SFU Surrey

    61 posts

    I’m also still having some trouble with the preview on this same form. I wasn’t able to get a preview working because of the conditional statements. I have made the posts be closed items when a users submits a post and have allowed them to view these. But the entry dates vary depending on what the user chooses, so sometimes they will see other closed postings.

    How can I have it display only their post no matter what date they choose?

    This is what I have for my code so far:

    {exp:weblog:entries weblog="connect_events" category="8|7|4" limit="1" sort="desc" show_future_entries="yes" status="closed"}
  • #13 / Aug 20, 2008 1:21pm

    Robin Sowell

    13255 posts

    For the showing their own post only issue- try adding username=“CURRENT_USER” as a parameter.

    And to be clear- which I wasn’t last night.  If I put a stock saef on your site, the data still doesn’t ‘stick’ after clicking ‘back’.  If I put the exact same code on my site?  It does stick.  Which is very odd.

    Do you have any htaccess in use?  If so, we might try removing it for a test.  I didn’t spot anything odd in live headers, but it’s worth trying.

    Oh- and the conditionals aren’t going to work in the preview like you were going for.  But let’s just figure out why the values don’t stick on ‘back’ and go from there.

  • #14 / Aug 20, 2008 6:30pm

    SFU Surrey

    61 posts

    Thanks so much for all your help Robin, I will try those things and see if they help at all.

  • #15 / Aug 20, 2008 9:02pm

    SFU Surrey

    61 posts

    I’ve checked the forms. I can not find any htaccess anywhere. I don’t believe that is the reason.

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

ExpressionEngine News!

#eecms, #events, #releases