WordPress.org

Ready to get started?Download WordPress

Forums

Custom Field Template
Multiple fieldsets delete data (10 posts)

  1. jdkoelsch
    Member
    Posted 3 years ago #

    I think I have fieldsets set up correctly, so that a user may enter one or more sets of data about a product. Everything works well until the user enters the third product data set. Upon updating the page, most of the data for those fieldsets is lost. In the database, the fieldset count is correct and the number of fields for that post_id is correct, but the meta_value for the second and third set is empty.

    Here is the fieldset configuration:
    [product_model]
    type = fieldset_open
    multiple = true
    multipleButton = true
    legend = Configuration Models & Descriptions

    [product_model_name]
    type = textfield
    size = 35
    label = Model Name
    blank = true

    [product_model_description]
    type=textarea
    rows = 4
    cols = 80
    label = Model Description
    blank = true

    [product_model]
    type = fieldset_close

    I configured the fieldset based on the info provided by @proximity2008 in this post:
    http://wordpress.org/support/topic/plugin-custom-field-template-unique-id-of-each-instance-of-a-multiple-field?replies=5

    He mentions that he has found it to be buggy too -- we may have run into the same problem. Has anyone found a solution to this or come up with a different way to provide this functionality?

  2. Kevin Leary
    Member
    Posted 3 years ago #

    Disabling the Auto Save feature may do the trick. It's under Global Settings > In case that you would like to save values automatically in switching templates:.

  3. jdkoelsch
    Member
    Posted 3 years ago #

    Thanks for the reply. I disabled it when I first started configuring the custom post type pages.

    At this point, I'm going to remove the fieldset functionality until I have a chance to debug the plugin. If I find anything I'll be sure to post pack to this thread.

  4. djanym
    Member
    Posted 3 years ago #

    is there some other plugin with multiple file uploading or with fieldsets feature?

  5. Kevin Leary
    Member
    Posted 3 years ago #

    Simple Fields looks promising, though I can't say I have any experience working with it.

  6. djanym
    Member
    Posted 3 years ago #

    I've tried Simple Fields, but it seems to be buggy... And as the author himself writes that it's not completed yet.
    So, I had to write myself a solution to this problem.
    I posted detailed instructions from start to finish on my blog. But there is in Russian. So here I am writing for those who do not know Russian. )
    First, the fields of the type "file" - don't put the option "blank = true". This is one reason that the files are not stored.
    Secondly, we must add the following code to the plugin.
    In the file plugin custom-field-template/custom-field-template.php find the row 2641 and after - add the following code:
    $temp[$name] = $data['parentSN'];
    You should get something like this:

    if ($data['type'] == 'file'):
    $temp[$name] = $data['parentSN'];

    Further, after line 2678 add the following code:
    if ($temp) foreach ($temp as $key => $psn) $_REQUEST[$key][$psn] = $save_value[$key];
    That's all. Anyway, there are still some bugs with adding / removing files, but in general it should work.

  7. Kevin Leary
    Member
    Posted 3 years ago #

    As of 2/10 the plugin author has updated the plugin to address fieldset issues:

    Bugfix: multiple options for the fieldset type.

    Can anyone verify that this issue is resolved?

  8. Alexey
    Member
    Posted 3 years ago #

    Hi jdkoelsch, did you find any solution?
    i have the same problem now :(

  9. djanym
    Member
    Posted 3 years ago #

    Can anyone verify that this issue is resolved?

    No, it's still does not working...

  10. djanym
    Member
    Posted 3 years ago #

    any new solution?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic