- This topic is empty.
-
AuthorPosts
-
November 3, 2010 at 10:36 am #27682dashalunaMember
Hello everyone,
I would like to add AJAX to meta boxes in WP admin area – when adding/editing data for a custom post type.
Here is a breakdown of what I’m trying to do:
1. I have a custom post type for CDs
2. Each CD can have multiple tracks
3. I want the ability to add tracks one-at-a-time through a custom edit form
4. I want to add tracks via AJAX (after hitting the “Add track” button, the track information is automatically added to the CD and I can add another track)
5. I would like the ability to dynamically drag-and-drop tracks into a different order(This is similar to the WP Categories screen functionality in the Admin area. Where you can add category and it will appear in the list of all categories straight away and you are able to fill in a form and add another category).
I got as far as creating a meta box with a static number of tracks. However, I don’t know how to proceed and add AJAX to the meta box to be able to add tracks “on the fly” as required.
I would really appreciate any help! @Chris Coyier maybe you’ve done a tutorial/screencast about – I would really if someone could point me to the right direction. I’m quite new to WP, but really want to learn great stuff!
Many thanks,
DashaNovember 3, 2010 at 12:40 pm #77286cbraccoMemberWow, weird that I stumbled upon this, I am extremely interested in accomplishing the same task. Something like this would make it insanely easy for the artist I am working with to manage the discography section of his website. I was able to create a custom post type for the artist to make entering basic discography information a bit easier for him, but if he wants to edit the “track list” he has to place it in an ordered list inside a simple textarea box, which introduces an added learning curve to the process, and is not very user-friendly for artists that do not care to learn HTML.
How could I create an AJAX’ed meta box that allows the user to add/remove/drag&drop input fields, and when saved automatically displays them as an ordered list on the website?
I’m not a web developer, but I know the basics, I understand the lingo, and I’m comfortable working with WordPress and PHP/XHTML/CSS.
Any help is greatly appreciated!
:)
Chris
November 19, 2010 at 7:36 pm #74377cbraccoMemberCan anybody provide some help/direction here? Pleeeease? :)
Chris
September 11, 2011 at 7:41 pm #86993ChristinaHooperMemberI’m trying to do the same thing, but I’m doing it for a custom slider instead of music tracks on a cd. I wanted to give the user the ability to put in an image path (or even better, upload an image from the custom fields area and show a preview) and enter in a caption and sort the images in the order they want them displayed. They should be able to add one image, hit an ‘Add’ button and then keep doing that until all their images are displayed.
Did anyone ever figure out how to do this?
February 19, 2012 at 3:54 am #96945stevhillMemberI think this might help: Reusable Custom Meta Boxes Part 3: Extra Fields. Look at the bottom in the “Repeatable Fields” section.
-
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.