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?
- Add a class to links in the visual editor (how to get old dialog back)
- Metabox repeating fields – radio buttons not saving correctly
- How can merge two arrays values in one array and save in database
- Gutenberg Blocks doesn’t render correctly when using do_blocks
- Calling a method from functions.php on a click of a button
- Get post meta in enqueued js file
- How to use WordPress (PHP) functions in AngularJS partials files?
- How to create a custom config file and get data using inline JS in a wordpress page
- Compare two meta key values against each other inside the get_posts array?
- Using an Image Slider twice on the same page
- Archive dropdown styling not applied
- using woocommerce_template_single_add_to_cart in shop-loop – javascript issues [closed]
- Can an array be used as a meta_query value?
- Use WordPress’s Media Uploader/ Manager in non WordPress php application
- Get/Set wp.customize.previewer.previewUrl
- List of posts by day of the week
- How to speed up admin-ajax.php in wordpress
- JQuery not working on WordPress Admin page [closed]
- How to make custom total price reactive in navigation
- Adding tawk.to code just before body tag on functions.php file
- How can I output a php value into a JS file within WordPress?
- How to test nonce with AJAX – Plugin development
- Create shortcodes within foreach loop (using array)
- Slider loading issue
- Creating a Multi-Level Associative Object Using AJAX
- remove wp floating submenu in wp dashboard
- search and replace preword from author
- How to complete two other input fields, completed the first
- Status 400 for AJAX POST Request with admin-ajax.php
- Reprinting tags with all attributes
- Need Help Fixing My Iframes [closed]
- wp_enqueue_scripts leads to error
- Passing UTM Parameters To Modify Page In WordPress
- 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?
- PhantomJS with wordpress
- Checking array against author id in loop
- Media Upload , file name changed automatically
- Add / Update Custom Fields After Select Pictures in Media Window
- Generate sidebar depending on height of post
- How to add specific meta tags to head of cart and checkout pages in woocommerce?
- Grouping posts by a custom meta value
- Tell WP register script to load a script only when the entire page is loaded
- trouble with page_id & highlighting current page
- wordpress admin plugin menu custom css
- Load Posts on Click via Ajax into a DIV
- How to use two meta_compare in an array?
- After adding my website to a new server, I keep getting a unexpected end of file error, but the file is identitcal to it’s original source
- How to access or parse key/values that have “string”
- Why i can’t get custom fields value or post ID via Ajax?
- Cannot access $wpdb, comes back NULL
- How to reference PHP in Javascript
- get db values for external js file
- Multidimensional Array
- Only load certain artists on this page
- Accessing an API with jQuery and AJAX
- Ajaxurl suddenly not defined
- Finding and removing duplicates within WP Arrays
- WordPress – Get Posts with Category data
- html form: redirect page after form completes submit function and posts data
- Creating a brand attribute as a variable
- Cannot find the php_ini configuration file to find my error log to see why my code is not working
- Add other class content with reference class value
- How do I integrate vanilla Javascript to a wordpress website?
- ACF values to Script with auto refresh
- WordPress Slider is not working
- ACF – Get ID of relationship field in flexible content
- Replace an array (with identical values) with another array in the_content
- Pulling Products from an API
- wordpress dependent dropdownlist using post type is not working
- Filtering markers on google map by WordPress category[SOLVED]
- Call jQuery function from PHP?
- How to call a function from functions.php with ajax?
- I want url from a file in media using title file
- scroll scrpit to particular button position to next id when click button
- Find the method which AJAX GET calls
- How to call javascript function (jquery) in a shortcode?
- Add custom filter to register data in array
- Page returning ID from array, how to return the correct values for post in acf wordpress
- Unserializeing multiple column values that are stored in one database results variable
- Why this plugin is not working?
- Trying to fix multiple category drop down
- get_permalink returning first letter
- How to print array of specific item
- js code not stored in database currectly
- Facebook share button only share the_permalink(), without thumbnail, tilte, excerpt, etc
- get_option(‘admin_email’) not working in wordpress when using ajax call
- how can I make content from a plugin hidden when user is logged in? [duplicate]
- Disable Typed Parameters for JavaScript in PhpStorm? [closed]
- Losing Session ID and sessionStorage when navigating to other domains on Multisite
- Grabbing value of input field inside of array
- How can I use AJAX in child theme template?