Support » Plugin: WordPress File Upload » Retrieve a value from additional fields

  • Hi, first of all congratulations on the plugin! I am using it for a larger project.
    I have 2 additional fields set up.
    I noticed that they are both retrieved with the $userdata[“value”] variable. But what if I only want to retrieve only one of these fields?
    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author nickboss

    (@nickboss)

    Hi, have I given you any hook that relates to $userdata[“value”]?

    Nickolas

    It might be useful.
    In practice I would need to fetch only one of the additional fields through php.

    Andrea

    Plugin Author nickboss

    (@nickboss)

    The plugin has some filters to do that. When do you want to fetch the field? after upload?

    Nickolas

    No, not after the download, but while. Let me explain: when the file is loaded I need one of the additional fields to be registered in another table that I have created in the database. If I use “userdata [” value “]” to insert it, he only inserts the first additional field. Is there a correct syntax to enter the array and take only the field I need?

    Plugin Author nickboss

    (@nickboss)

    Can you point me where have you put userdata[“value”]?

    I used it in wfu_functions.php, with the intention of retrieving one of the additionals data and inserting it in a new table of the db.

    $wpdb->insert($newtable,
    array(
    'mycolumn'   => $userdata_field['value']
    ),
    array( '%s' ));
    }

    in “mycolumn” I would like to insert only one of the additional data contained in “$userdata [‘value’], without the rest of the file information. Is it possible or am I wrong to approach?

    Plugin Author nickboss

    (@nickboss)

    Can you please send me the complete code?

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.