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 not able to adjust the Entry Date

January 19, 2011 1:12pm

Subscribe [1]
  • #1 / Jan 19, 2011 1:12pm

    Eastwood Design

    605 posts

    Using ver 1.6.7

    when using a SAEF to post an entry I cannot adjust the entry date:

    <strong>Entry Date:</strong> (Must match exact format YYYY-MM-DD hh:mm PM)
    <input type="text" name="entry_date" value="{entry_date}" maxlength="23" size="25" /></p>

    so this form defaults to the current time, and if I try and change that date/time and submit it will automatically go back to the current date/time

    How do I create a entry date in the future when posting with the SAEF?

  • #2 / Jan 20, 2011 3:41am

    Ingmar

    29245 posts

    Can you show us a little more of your relevant code? I suppose adding an entry via the CP works fine? I also recommend upgrading to EE 1.7.

  • #3 / Jan 20, 2011 9:12am

    Eastwood Design

    605 posts

    Yes posting in the CP works fine.
    And now that I look at this code, it looks like I have 2 entry dates in there.  That may be my problem.

    {exp:weblog:entry_form weblog="Courses" return="site/course_post" preview="site/courses_posting"}
    
    {preview}
    <h1>{title}</h1>
    
    {display_custom_fields}
    
    {/preview}
    
    
    <table>
    <tr>
    <td>
    
    Title
    
    <input type="text" name="title" id="title" value="{title}" size="50" maxlength="100"></p>
    
    <strong>Course Start Date:</strong> (example format YYYY-MM-DD hh:mm PM)
    <input type="text" name="entry_date" value="{entry_date}" maxlength="23" size="25" /></p> 
    
    
    <strong>Course End Date:</strong> (example format YYYY-MM-DD hh:mm PM) 
    
      <input name="expiration_date" type="text" value="{entry_date}" maxlength="23" /><br ><br>
    
    
    {custom_fields}
    {if required}* {/if}{field_label}
    
    
    
    {if textarea}
    <textarea id="{field_name}" name="{field_name}" dir="{text_direction}" cols="50" rows="{rows}">{field_data}</textarea><br >
    
    {/if}
    
    {if textinput}
    <input type="text" dir="{text_direction}" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="50"><br >
    
    {/if}
    
    {if pulldown}
    <select id="{field_name}" name="{field_name}">
    {options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
    </select>
    
    
    {/if}
    
    {if date}
    {exp:cal_saef:calendar name="{field_name}"}
    {calendar}
    {clear_link} {today_link}
    {/exp:cal_saef:calendar} 
    <input type="text" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="50"><br >
    
    {/if}
    
    {if relationship}
    <select id="{field_name}" name="{field_name}">
    {options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
    </select>
    {/if}
    {/custom_fields}
    
    <input type="submit" name="submit" value="Submit" />
    
    
    
    
    <input type="hidden" name="entry_date" value="{entry_date}" maxlength="23" size="25" /></p>
    
    
    </td>
    
    </tr>
    </table>
    
    {/exp:weblog:entry_form}
  • #4 / Jan 20, 2011 4:09pm

    Ingmar

    29245 posts

    And now that I look at this code, it looks like I have 2 entry dates in there.  That may be my problem.

    Quite possible. Can you try with a reduced entry form?

  • #5 / Jan 20, 2011 4:11pm

    Eastwood Design

    605 posts

    the duplicate entry date was my problem.  SOLVED

  • #6 / Jan 21, 2011 3:21am

    Ingmar

    29245 posts

    Very glad to hear it. Please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases