File upload field in page creation problem.

edited October 2015 in Bug Reports
I have created a layout to use to create pages through the cms admin. In the layout I have a couple of fields for images to be uploaded. However, if I go to edit the content of the page, the fields are blank and if I save the page without reuploading the images to those fields, it saves them as blanks. How do i get the cms to not overwrite saved image data unless a new image is uploaded? or at least pre populate the field with what is currently saved.

Comments

  • edited 12:04AM
    What is the layout fields code you have and is the assets/images folder writable by PHP?
  • edited 12:04AM
    Yes the assets folder is writable. The image will upload and save just fine, it just isn't pre populated when you try to edit it at a later time and saving any other edits overwrites the saved image with a blank.

    This is my layout code example:
    $config['layout_fields']['landing_page'] = array(
    'logo' => array('type' => 'file', 'description' => 'Logo')
    );
  • edited 12:04AM
    There is a display_input parameter you can use:
    http://docs.getfuelcms.com/general/forms#file
Sign In or Register to comment.