I have form with 3 steps, first step contain date field. When the first step is submitted the value of the field is stored properly but when the next step is submitted the value is cleared.

UPDATE:
the bug is not in this module.

as of file fields, this is a drupal core issue.
in #1205822: File(s) silently deleted when #access=false i have contributed a core patch
it needs some tests to get accepted but can be used right now.

as of date fields: this is a date module issue.
in #1144074: does not play well with multistep / does not validate correctly when #access=false i have contributed a patch which needs to be reworked (look which parts are already in HEAD and roll a new patch with the rest)
maybe someone can help out there or provide funding.

Comments

Peter Bex’s picture

This also happens with boolean fields.

geek-merlin’s picture

Status: Active » Postponed (maintainer needs more info)

does this still happen with current dev?

perarnet’s picture

I also have this problem with latest dev version. Also have the same problem with image field using filefield_paths

geek-merlin’s picture

Title: multistep clear date field value » date and file field values are silently deleted in steps where the field is not active
Issue tags: +FileField

as of date fields: this is a date module issue.
in #1144074: does not play well with multistep / does not validate correctly when #access=false i have contributed a patch which needs to be reworked.
maybe someone can help out there or provide funding.

as of file fields, this is a drupal core issue.
in #1205822: File(s) silently deleted when #access=false i have contributed a core patch which i hope gets accepted.
you might help and test this patch and set status to "reviewed..." there!

using both patches i'm running a production site with file, image and date fields.
hope this helps ya!

Anonymous’s picture

I have this problem with image file fields.

Step 1: Title
Step 2: Image

I can upload the image & click "save" - no problem.
Now, if I edit the nod and start at Step 1, and go Next > to Step 2: now the image file is missing. It's gone.

geek-merlin’s picture

@morningtime: as image uses file.module this should be solved by the core patch mentioned in #4
did you try this?

Anonymous’s picture

Aha, hadn't seen that. I believe it solved my problem.

geek-merlin’s picture

@morningtime: so you might want to confirm this at #1205822: File(s) silently deleted when #access=false so to seed up this going core!

doana’s picture

I needed a quick solution until this issue is solved. A quick workaround for this is to use hook_form_alter and unset the fields that aren't present on the step that you're currently on.

function MYMODULE_form_alter(&$form, $form_state, $form_id) {
    switch ($form_id) {
        case 'content_type_node_form': //Substitute your content type form here

            if($form['#multistep']['current'] != 'group_background') {
                unset($form['field_date1']);
            }

            if($form['#multistep']['current'] != 'group_a_review') {
                unset($form['field_date2']);
                unset($form['field_date3']);
            }

    }

}
perarnet’s picture

Status: Postponed (maintainer needs more info) » Active

Axel: Can you try to repatch in the date module? Karens closed your issue due to no more information.

geek-merlin’s picture

Status: Active » Postponed

sorry, don't have time for this right now, but added an explicit issue update.

dtrdewaele’s picture

Reimplemented this piece of code in a new project with locale module on and this gives a lot off errors :) Works without locale enabled.

dtrdewaele’s picture

Issue summary: View changes

added summary

svipsa’s picture

Issue summary: View changes
StatusFileSize
new906 bytes

Added patch to fix validate dates.