Embeddable Forms

Embeddable Forms allow users to upload files from the Front-End. These forms can be insert into any Post or Page content using a shortcode.

Create a Form

  1. Check your security settings. Goto WP-Filebase -> Settings -> Security, “Enable front end uploads“. Then click on the Permissions tab and adjust the Frontend Upload Permissions.
  2. Create the form. Click on Embeddable Forms Menu entry, use the form below the list. See Properties of Embeddable Forms .
  3. After creating the form it will appear in the list. Now create/edit a Post or Page where the Form should be placed. Open the Editor Plugin, click on the “Embed Upload Form” tab. With your mouse, hover on an item and the Insert link will appear below the name. Click on that link and the shortcode will be inserted into the content.

Properties of Embeddable Forms

Form Tag: this is just an indetifier or Name of the form. It should only contain alphanumeric and underscore characters.

Upload to Category: “Selectable by Uploader” means, that the Upload Form includes a Select element where the uploading user can choose the Category where the file will be uploaded to. If set to “Upload to Root” or a Category, this is fixed and cannot be changed by Uploader.

Overwrite existing files: If a File with the Same name and Category exists, it will be overwritten when this checkbox is enabled

Attach uploaded files to post or page the form is embedded in: Uploaded Files will be attached to the current post or page, so they usually appear below the content, using the default File Template.

Use advanced Drag & Drop Uploader: This enables the modern HTML5 Uploader with Progress Bar and Drag & Drop function.

Notify Admins whenever a file is uploaded: when enabled, all Site Admins are notified by email when a file is uploaded using the form

More email notifications: Here you can enter additional E-Mail Addresses that will be notified as well

Permission: Define who is allowed to use the form. The form will be hidden for not permitted users

Uploaded files must been approved: Uploaded files are set “offline” after upload, and have to be approved by an admin to be publicly  available.

 

19 thoughts on “Embeddable Forms

  1. Andrew Reinhardt says:
    VA:F [1.9.22_1171]
    Rating: +1 (from 3 votes)

    Hello FB Pro, I have a “pro” license and am using the “embeddable forms” to create a document upload form for the front end of a site.

    I found what I believe to be a bug — In the settings for each form, there is a checkbox that says “Notify Admins whenever a file is uploaded”. I was noticing that sometimes I’d get the Edit / Delete links in my notification emails, and sometimes I would not. Looking at the SendEmailNotifications function, it appears as though only the last user in the result set of the “GetAdminUsers” array would get the edit/delete links:

    Current lines 133-141 of EmbeddedForm.php:

    if(empty($form) || $form->notify_admins) {
    $email_to[] = get_option('admin_email');
    $admins = self::GetAdminUsers();
    foreach($admins as $admin) {
    $email_to[] = $admin->user_email;
    }
    $can_edit[$admin->user_email] = 1;
    $can_del[$admin->user_email] = 1;
    }

    My suggested change would mean that every user in the GetAdminUsers result set would receive the edit/delete links, not just the last user in the result set:

    if(empty($form) || $form->notify_admins) {
    $email_to[] = get_option('admin_email');
    $admins = self::GetAdminUsers();
    foreach($admins as $admin) {
    $email_to[] = $admin->user_email;
    $can_edit[$admin->user_email] = 1;
    $can_del[$admin->user_email] = 1;
    }
    }

    One additional suggestion —

    You give the option for “More email notifications”, which is great. Now let’s say you want only specific users to receive notification emails, and not all “Admins” in the GetAdminUsers result set.

    My way of accomplishing this was to uncheck the “Notify Admins” checkbox and then just manually add an admin email address to the “More email notifications” field.

    The problem with this is that any users added through that text field will not be eligible to receive the edit/delete links.

    My suggested change would mean that if any of the emails in the “More email notifications” field correspond to a user in the GetAdminUsers result set (meaning they should be able to edit the file), they’d also get the handy edit/delete links.

    Current lines 143-157 of EmbeddedForm.php:

    if(!empty($form->notify_emails))
    $email_to = array_merge($email_to, array_map('trim', explode(',', $form->notify_emails)));

    if(WPFB_Core::$settings->upload_notifications) {
    $users = get_users(array('number' => 5000));
    foreach($users as $user) {
    if($file->CurUserCanAccess(false, $user)) {
    $email_to[] = $user->user_email;
    if($file->CurUserCanEdit($user))
    $can_edit[$user->user_email] = 1;
    if($file->CurUserCanDelete($user))
    $can_del[$user->user_email] = 1;
    }
    }
    }

    Suggested change:

    if(!empty($form->notify_emails))
    $email_to = array_merge($email_to, array_map('trim', explode(',', $form->notify_emails)));

    // loop through wp users and see if we need to add recipients or modify email content

    $users = get_users(array('number' => 5000));
    foreach($users as $user) {

    // see if user can access file

    if($file->CurUserCanAccess(false, $user)) {

    // check about adding edit/delete links...
    // 1. if we have "upload notifications" on in the miscellaneous settings, meaning any user who has "edit" rights will receive an email notification
    // 2. if we have users in the "more email notifications" form settings, check those profiles and add the edit/delete links if they are a user with "edit rights"

    if( WPFB_Core::$settings->upload_notifications || in_array($user->user_email, $email_to)){

    if(!in_array($user->user_email, $email_to)){
    $email_to[] = $user->user_email;
    }

    // ok this user is set to receive an email notification already.
    // should they also receive the edit/delete links?

    if($file->CurUserCanEdit($user))
    $can_edit[$user->user_email] = 1;
    if($file->CurUserCanDelete($user))
    $can_del[$user->user_email] = 1;
    }
    }
    }

  2. ivan turatti says:
    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    hi, i don’t manage to upload anything form frontend … it keeps saying “Cheatin’ uh?” … i really need some help please.

  3. GAYLORD DICKINSON says:
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    Thought-provoking commentary ! I learned a lot from the points . Does someone know if I might get ahold of a sample 2005 MN Residential Purchase Agreement version to fill out ?

    1. CHASTITY MULLETT says:
      VA:F [1.9.22_1171]
      Rating: 0 (from 0 votes)

      Hi XXX , my friend got access to a fillable 2005 MN Residential Purchase Agreement version at this site http://goo.gl/VskneF.

Leave a Reply

Your email address will not be published. Required fields are marked *