Changeset 1688582
- Timestamp:
- 07/01/2017 12:27:08 AM (8 years ago)
- File:
-
- 1 edited
-
frontend-uploader/trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
frontend-uploader/trunk/readme.txt
r1688580 r1688582 34 34 The same shortcode with some customizations would look like this: 35 35 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" 37 form_layout="media" title="Upload your media"] 38 [input type="text" name="post_title" id="title" 39 class="required" description="Title"] 40 [textarea name="post_content" class="textarea" 41 id="my-textarea" description="Description (optional)"] 42 [input type="file" name="photo" id="my-photo-submission" 43 class="required" description="Your Photo" multiple="multiple"] 40 44 [input type="submit" class="btn" value="Submit"] 41 45 [/fu-upload-form]` … … 49 53 In 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/ 50 54 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" 56 class="my-class validate" post_type="story" append_to_post="true" 57 success_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 63 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`. 64 Example: 65 `[fu-upload-form form_layout=”post”]` 66 67 *title* 68 69 Add this *[fu-upload-form]* shortcode, and this will be the Headline that will be displayed before the form. 70 Example: 71 `fu-upload-form class="your-class" title="Upload your media"]` 72 73 *class* 74 75 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.’ 76 Example: 77 `[input type="text" name="post_title" id="title" class="required"]` 78 79 *post_type* 80 81 Any post whitelisted in settings post type. Defaults to 'post'. 82 Example: 83 `[fu-upload-form post_type="my-custom-post-type-slug"]` 84 85 *append_to_post* 86 87 Automatically insert images into uploaded post *(true or false)* 88 89 *success_page* 90 91 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. 92 93 *category* 94 95 ID of category the post should be attached (only in post or post+media mode). 96 97 *post_id* 98 99 ID 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 103 Override global setting for supressing default form fields *(true or false)*. 104 Example: 105 `[fu-upload-form suppress_default_fields="true"] ... inner shortcodes omitted... [/fu-upload-form]` 95 106 96 107 … … 105 116 * `[input type="submit" class="btn" value="Submit"]` => A submit button 106 117 107 ** Each field has a set of attributes**118 **Field Attributes** 108 119 109 120 `id` - id of element
Note: See TracChangeset
for help on using the changeset viewer.