I'm confuse how to make new form in Wordpress
this form can upload file too
and will be saved in new table I created
or can I use [Contact7] ??
if can, where I can change the table destination?
Try this:
You should use contact-form-7 wordpress plugin.
Take this from:
https://wordpress.org/plugins/contact-form-7/
You will get all solutions here.
--
Thanks
Related
I am making a java script to create a few posts in a Wordpress blog by only inserting them into the wp_posts so table. So far I could browse the posts on web browser. Question is, is it good enough with the db operations ? does anyone know any other subsequent tables need to be updated for making a post ?
Not really, you can extend the default and existing WordPress posts.
But you can go ahead and create your own table like: https://github.com/wp-plugins/wordpress-guest-post/blob/master/wordpressguestpost.php
ended up adding REST API V2 plugin and make calls to it for creating all sorts of things. Worked like a champ
First of all, I am absolutely new to WP.
I am hoping to build a site using WP and figured out how to manage every thing except one feature. The feature that is required is to be able to submit a form with files (images in particular) by a non member.
For example, you should be able to visit the site and fill a form and submit your image along it.
Is it possible to upload files as above? How is this achievable?
Thanks in advance.
If you are not a wordpress coder , I would sugest you use a plugin for that .
Some options :
http://wordpress.org/extend/plugins/user-submitted-posts/
http://wordpress.org/extend/plugins/tdo-mini-forms/
http://wordpress.org/extend/plugins/quick-post-widget/
http://www.gravityforms.com/category/features/
and many more ..
read also this tutorial : http://wp.tutsplus.com/tutorials/allow-users-to-submit-images-your-site/ - it is not for VISITORS but for registered users - but it might help you to understand what is needed to be done .
I would use the Contact Form 7 plugin to do this, as it's extremely easy.
In the plugin settings you'll be able to choose what parts of the form you'd like to include, adding a way to upload is one of those options. You can even limit the type of file that is being used as well the max file size.
Once you create a form in the settings, you just use its shortcode to add it to your Wordpress page.
Yes you can upload file, but it is not a Wordpress specific solution, unless you want to use a plugin. You can code html/php as per usual to achieve it:
http://www.w3schools.com/php/php_file_upload.asp
To embed it on a page, you can create a Page in Wordpress, and assign it a custom page template that you create with the upload form:
http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
I'm outputting some files from the media section on a page (i'm using a plugin called related links to do this). I have access to the id of the file....I need to query wordpress based on this id to get the upload date and description.
How do I do this? Can't find info on this in codex
I'm using this solution: http://www.emmanuelgeorjon.com/eg-attachments-1233/
Good luck! :)
I am using Wordpress's add_meta_box() function to add customized meta fields to the Add New Post page, like this. I want one of these fields to allow the user to upload a file, so that a single image, pdf, audio file, or video can be associated with the post.
The closest example I've seen is this one (link removed*). Unfortunately it does not suit my needs, as I want my file to be processed by Wordpress's Media Uploader - so it should appear in the Media Library afterwards, and thumbnails should be generated according to the Media settings.
I think ideally there would be a way to tap into Wordpress's existing Add Media dialog, and simply output the URL of the uploaded file into a text box, but I don't see how to do that. This question is similar, but the answers are a little clunky - I would like to keep this super simple for my end users.
How can I accomplish this? Please do not recommend plugins such as Flutter or Magic Fields - I have tried these and they do not suit my purposes (I want the images to be processed by Wordpress's Media Uploader). I am using Wordpress 3.0-alpha.
(*=link removed due to report of malware; it is in the archive, but at own risk)
I eventually figured this out for myself and got it working just as I wanted, and thought I would post an update for anyone who finds this question and is curious.
I did not use any plugins, but wrote a custom function to handle file uploads for my theme. I used built-in Wordpress functions such as save_custom_postdata(), wp_handle_upload(), wp_insert_attachment(), wp_generate_attachment_metadata() and wp_update_attachment_metadata().
I also had to use add_action('admin_head'...) to add some JavaScript which adds "multipart/form-data" to the form tag on the Edit Post page, to allow file uploads.
I would post my code, but it is very long and specific to my project.
You needn't use JavaScript to edit the form. This is possible to do using the post_edit_form_tag function like so:
add_action( 'post_edit_form_tag' , 'post_edit_form_tag' );
function post_edit_form_tag( ) {
echo ' enctype="multipart/form-data"';
}
More details (including an example) are available at http://codex.wordpress.org/Plugin_API/Filter_Reference/post_edit_form_tag.
Take a look at Image Widget - a well made widget that does what you want, but as a widget. Maybe you can convert it to work on your Add new post page.
Another plugin you can try is Pods CMS. Might be overkill but when you do fileuploads with this, they are automaticly added to the media library.
This WordPress Meta Box PHP Helper class might help you when working with WordPress Meta Boxes.
I think this is what you're looking for: http://wordpress.org/extend/plugins/nkmimagefield/
Apparently it doesn't support custom post types but a little hacking should do. It already does the hard work of interfacing with the media editor.
I know how to add a childpage to an existing book, with an url like this:
/node/add/book?parent=9228
The last number is the book page's id.
How can I set it to create a new book?
Thanks.
I have looked at the code but as far as I can see, Drupal does not offer that possibility by default. I'm not 100% sure if this works, but you could try to install the prepopulate module and use this:
/node/add/book?edit[book][bid]=new