Here is my own solution.
In my html I’ve assign id to all the item and inside the form I’ve added an input option where I pass the value through the script and it was saved later. Simple…
script
jQuery(document).ready(function($){
$(".sortable").sortable({
connectWith: '.sortable',
receive: function (event, ui) {
document.getElementById('hello1').value = myFunction();
},
out: function (event, ui) {
document.getElementById('hello1').value = myFunction();
}
});
function myFunction(){
var idArray = $("#droppable > p").map(function(){
return this.id;
}).get();
return idArray;
}
});
Related Posts:
- Using a javascript file to access a get posts array
- Populate dropdown with Child Pages based on Parent Page chosen
- Display one random image from Media Library
- Show the subcategory name based on current product
- make an array in wordpress cusmization api?
- How can i iterate through this shortcode array?
- How to get values from wordpress listings and use them in javascript array?
- How to pass php array to external js file in WordPress
- Using a variable in is_page(array())
- Trigger popup in a php if/else statement
- Remove duplicates – array_unique()
- How can I add multiple ‘tax_query’ arrays via a loop?
- Slider loading issue
- AJAX request status 200 but no actual “response”
- Button not refreshing page
- How to properly loop through these external URLs to get them into the sitemap using this hook
- Ajax not working es expected (Returns 0)
- Use menu link or onClick to set a variable
- Recent posts with featured image or fallback image with permalink
- How to select the contents in the text view textrea in wp_editor?
- Creating a Multi-Level Associative Object Using AJAX
- Call global variable array() in woocommerce child/template
- WP functions in .js
- Adding custom directory and PHP files in wordpress
- Storing Array from returned database query and using the array in a new query
- Ajax – Call to undefined function get_option()
- get_the_tags() not iterating through for/while loop, but will with foreach
- get a simple array of all of the term names that exist in all taxonomies
- remove wp floating submenu in wp dashboard
- Displaying admin notices inside the block editor from rest_after_insert_{$this->post_type} hook
- How to use $query->set with post__in?
- search and replace preword from author
- How to prevent XSS alter custom global javascript object & methods in WordPress
- How to complete two other input fields, completed the first
- Status 400 for AJAX POST Request with admin-ajax.php
- How to inject variables into public-facing JS using wp_enqueue_script
- How to pass aa JS variable to PHP?
- Customize Theme comment template to Insert VoteUp and VoteDown buttons
- Ajax random number always the same
- Image upload via FormData API and AJAX is not working ($_FILES always empty)
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- Reprinting tags with all attributes
- JS file work only in index page
- Need Help Fixing My Iframes [closed]
- wp_enqueue_scripts leads to error
- Javascript file is not working on single.php wordpress [closed]
- How to change redirection route to a php page for making it only accessible by logged-in members?
- Integrating PHP into Javascript to display map markers with Google API – problem with wp_localize
- PHP Array Returning [object Object]. Tried existing answers results with no luck
- Save Search System
- foreach loop still echoes array
- dynamic dependent select dropdown
- Passing UTM Parameters To Modify Page In WordPress
- How to send Ajax request from my plugin in admin dashboard?
- Incorrect MIME type for assets with Valet
- Customizer: Multiple CSS styles on same element in Live Preview
- wordpress visual composer change grid builder post link
- Ajax load more button for comments wordpress
- How to register javascript variables in wp_localize_script?
- Open post-content in archive page in a Modal box with bootstrap
- Creating own shortcode – echoeing php variable based on JS variable
- How to add a do_action on refreshing of WP customizer?
- Exclude posts based on meta value
- How to pre populate a form field with a link of a current user’s author profile?
- parts of url disappear when using # inside href=”” [closed]
- How to pass Select value from Javascript to PHP to generate select option on change
- Menu jumping when calling it via PHP
- How does wp_enqueue_scripts work?
- wp attempt focus, disabling without touching core
- Setting value of session with Ajax not working
- AJAX success response is not working but it’s saving my changes
- PHP array to JS array to use in google map
- PhantomJS with wordpress
- Checking array against author id in loop
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Media Upload , file name changed automatically
- Add / Update Custom Fields After Select Pictures in Media Window
- Post repeating with infinite scroll
- WordPress Scripts Being Loaded in Footer
- Fancybox type popup window that’s not an iframe
- Generate sidebar depending on height of post
- Accessing WPDB Multidimensional JSON Array w/ Javascript
- how to make my website secured
- How do I Import / Upload Files with jQuery AJAX?
- wordpress wp_enqueue_script() not working
- Redirect to another page using contact form 7? [closed]
- How to add specific meta tags to head of cart and checkout pages in woocommerce?
- Alter required message using comment form api
- Noscript not working as it should in wordpress site
- WordPress Ajax Call inserting data but success response false
- How to optimize the IF condition with many conditions and same output [closed]
- Advanced Custom Fields – display label and value only if value entered
- How to correctly add Javascript to this PHP ‘Page Not Found’ Page?
- meaning of (array)function()
- Grouping posts by a custom meta value
- Is the wp_enqueue method efficient?
- PHP echo inside javascript
- admin-ajax Firing Error 400 When Logged In
- How to add API security keys into JS of wordpress securely
- wp_force_remove_style’ not found