Tag Info

New answers tagged

0

Handling form fields is not related to WordPress and is off-topic here, BTW I'm answering this on how to use the options table. And your code you presented here is not relevant to your question. Ok, first of all having form data into a field after submission could put you in risk of entering duplicate entries. BTW here's how you can do that (follow the ...


1

Building on the accepted answer and filling in some details... You need to call wp_localize script right after wp_enqueue_script. So, something like this: function my_enqueue_scripts() { wp_enqueue_script( 'myjs', plugins_url( 'js/my.js', __FILE__) ); $options = get_option( 'my_settings' ); $scriptData = array( ...



Top 50 recent answers are included