I’m having the same problem with the title attribute.
Couldn’t get item 1 to work: this ‘author’ field seems redundant!
Got item 2 working eventually, and am using this to write my own author data:
[fu-upload-form post_id="2" title="Submit your paper"]
[input type="file" name="photo" id="ug_photo" class="required" description="Your File" multiple=""]
[input type="text" name="author_name" id="author_name" description="Name of Author"]
[...other fields added here...]
[input type="submit" class="btn" value="Submit"]
[/fu-upload-form]
(had to check ‘Suppress default fields’ in Settings and add my own, eg submit )
Then, in Theme Functions (functions.php):
function my_fu_after_upload( $attachment_ids ) {
foreach( $attachment_ids as $att_id ) {
$title = $_POST['title'];
wp_update_post( array( 'ID' => $att_id, 'post_title' => $title ) );
$content = $_POST['post_content'];
wp_update_post( array( 'ID' => $att_id, 'post_content' => $content ) );
$excerpt = 'Author: ' . $_POST['author_name'] ;
wp_update_post( array( 'ID' => $att_id, 'post_excerpt' => $excerpt ) );
}
}
add_action( 'fu_after_upload', 'my_fu_after_upload' );
(I’m saving everything to the default fields in wp_post – post_content and post_exerpt)
Item 3 remains a mystery.
Hi,
I would like the user to be able to submit a post where there is a textarea which will be submitted as post_content. But some textareas are optional. is that possible?
Please reply me asap. Thanks.
Cheers.
J
Hi,
Does anybody knows what does <class=”your-class”> mean?
jlow82 “your-class” is just a place-holder for a css class that’s in your existing site. For example, if you want the field labels to use a class already found on your site, then it may look like this:
class=”welcome-message” if .welcome-message exists in your site’s css file.