• I have added the shortcode in a custom form.
    After user upload the file and then press Submit on my form, i cannot get the filename of uploaded file.

    I see at print_r($_POST) only:
    [uploadedfile_1] => demo-profile-image.png

    And in the uploads/ folder i have the image with timestamp name
    demo-profile-image-20170328170127.png

    How can i get the filename value after press submit?

    thanks

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

    (@nickboss)

    Hi, you want to run a custom PHP script with the filename? You can do it by implementing wfu_after_file_upload or wfu_after_upload filter. You can see instructions here.

    Regards

    Nickolas

    Thread Starter AndreiD

    (@andreiro37)

    I have a custom edit profile page with a form.
    I have
    – 1 upload image field
    – 1 upload video field
    and other felds like name, age ..

    When user click Update i need to get the values of those 2 fields to update them in database in custom user meta and is not obvious how to do it.

    2 shortcodes for these 2 fields look similar, arent differentiated by an id or something. Also, if a use add_filter how i identify between those 2 upload fileds (photo and video) to update their values in database for user cystom meta?

    Plugin Author nickboss

    (@nickboss)

    Hi, you need to differentiate those two shortcodes by setting different upload id. Then when you implement a filter, for instance wfu_after_upload, there is a variable that holds the plugin id ($additional_data[“sid”] variable).

    This is a link of instructions for the filters.

    Regards

    Nickolas

    Thread Starter AndreiD

    (@andreiro37)

    “two shortcodes by setting different upload id”

    Those 2 shortcodes does nto have ids, should i add id attribute manually in shortcode?

    I ended creating custom code, but the plugin looks good and maybe i will use it for other projects.

    Plugin Author nickboss

    (@nickboss)

    you can add uploadid=”1″ is the first shortcode and uploadid=”2″ in the second, or you can do it visually using the visual editor (it is the first option)

    Nickolas

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Get input value after form submit’ is closed to new replies.