Plugin Directory

Changeset 1688582


Ignore:
Timestamp:
07/01/2017 12:27:08 AM (8 years ago)
Author:
rinatkhaziev
Message:

Readme update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • frontend-uploader/trunk/readme.txt

    r1688580 r1688582  
    3434The same shortcode with some customizations would look like this:
    3535
    36 `[fu-upload-form class="html-wrapper-class" form_layout="media" title="Upload your media"]
    37 [input type="text" name="post_title" id="title" class="required" description="Title"]
    38 [textarea name="post_content" class="textarea" id="my-textarea" description="Description (optional)"]
    39 [input type="file" name="photo" id="my-photo-submission" class="required" description="Your Photo" multiple="multiple"]
     36`[fu-upload-form class="html-wrapper-class"
     37form_layout="media" title="Upload your media"]
     38[input type="text" name="post_title" id="title"
     39class="required" description="Title"]
     40[textarea name="post_content" class="textarea"
     41id="my-textarea" description="Description (optional)"]
     42[input type="file" name="photo" id="my-photo-submission"
     43class="required" description="Your Photo" multiple="multiple"]
    4044[input type="submit" class="btn" value="Submit"]
    4145[/fu-upload-form]`
     
    4953In the following example we are creating a form with title "Upload your story and image". The form will allow to submit a custom post type *story* with an image which is going to be automatically inserted at the end of the story. The story will have a category with ID 1. On successful submission user will be redirected to http://example.com/success-page/
    5054
    51 `[fu-upload-form form_layout="post_media" title="Upload your story and image" class="my-class validate" post_type="story" append_to_post="true" success_page="http://example.com/success-page/" category="1" ][/fu-upload-form]`
    52 
    53 * The list of all parameters for [fu-upload-form] *
    54 
    55  `form_layout`
    56 
    57  This determines whether the form is saved as a post/custom post type (‘post’), as a media file (`media`), or as a post with images (`post_media`).  Default value is `media`.
    58  Example: *[fu-upload-form form_layout=”post”]*
    59 
    60  `title`
    61 
    62  Add this *[fu-upload-form]* shortcode, and this will be the Headline that will be displayed before the form.
    63  Example: **[fu-upload-form class="your-class" title="Upload your media"]**
    64 
    65  `class`
    66 
    67  HTML class of the form, defaults to 'validate'. If you want your form being validated - do not remove validate class. If you would like to item to be required before a user can submit, you can set it to ‘required.’
    68  Example: *[input type="text" name="post_title" id="title" class="required"]*
    69 
    70  `post_type`
    71 
    72  Any post whitelisted in settings post type. Defaults to 'post'.
    73  Example: *[fu-upload-form post_type="my-custom-post-type-slug"]*
    74 
    75  `append_to_post`
    76 
    77  Automatically insert images into uploaded post *(true or false)*
    78 
    79  `success_page`
    80 
    81  URL to redirect on successful submission, defaults to the URL where the form is being displayed. For security reasons this should be an URL on your site (no external links). You can use **[fu-upload-response]** shortcode to display success/error messages on the redirect page.
    82 
    83  `category`
    84 
    85  ID of category the post should be attached (only in post or post+media mode).
    86 
    87  `post_id`
    88 
    89  ID of the post the image should be attached to. Defaults to the post ID of the post the shortcode is on.
    90 
    91  `suppress_default_fields`
    92 
    93  Override global setting for supressing default form fields *(true or false)*.
    94  Example: `[fu-upload-form suppress_default_fields="true"] ... inner shortcodes omitted... [/fu-upload-form]`
     55`[fu-upload-form form_layout="post_media" title="Upload your story and image"
     56class="my-class validate" post_type="story" append_to_post="true"
     57success_page="http://example.com/success-page/" category="1" ][/fu-upload-form]`
     58
     59**The list of all parameters for [fu-upload-form]**
     60
     61*form_layout*
     62
     63This determines whether the form is saved as a post/custom post type (‘post’), as a media file (`media`), or as a post with images (`post_media`).  Default value is `media`.
     64Example:
     65`[fu-upload-form form_layout=”post”]`
     66
     67*title*
     68
     69Add this *[fu-upload-form]* shortcode, and this will be the Headline that will be displayed before the form.
     70Example:
     71`fu-upload-form class="your-class" title="Upload your media"]`
     72
     73*class*
     74
     75HTML class of the form, defaults to 'validate'. If you want your form being validated - do not remove validate class. If you would like to item to be required before a user can submit, you can set it to ‘required.’
     76Example:
     77`[input type="text" name="post_title" id="title" class="required"]`
     78
     79*post_type*
     80
     81Any post whitelisted in settings post type. Defaults to 'post'.
     82Example:
     83`[fu-upload-form post_type="my-custom-post-type-slug"]`
     84
     85*append_to_post*
     86
     87Automatically insert images into uploaded post *(true or false)*
     88
     89*success_page*
     90
     91URL to redirect on successful submission, defaults to the URL where the form is being displayed. For security reasons this should be an URL on your site (no external links). You can use `[fu-upload-response]` shortcode to display success/error messages on the redirect page.
     92
     93*category*
     94
     95ID of category the post should be attached (only in post or post+media mode).
     96
     97*post_id*
     98
     99ID of the post the image should be attached to. Defaults to the post ID of the post the shortcode is on.
     100
     101*suppress_default_fields*
     102
     103Override global setting for supressing default form fields *(true or false)*.
     104Example:
     105`[fu-upload-form suppress_default_fields="true"] ... inner shortcodes omitted... [/fu-upload-form]`
    95106
    96107
     
    105116* `[input type="submit" class="btn" value="Submit"]` => A submit button
    106117
    107 ** Each field has a set of attributes **
     118**Field Attributes**
    108119
    109120`id` - id of element
Note: See TracChangeset for help on using the changeset viewer.