Articles of radio

Required radio button does not validate in form, when clicked through Javascript/jQuery

I have a radio button that selects a dealer in my checkout. I need this button to automatically be checked for the user – however, no matter what I do, the radio button still needs to be clicked to validate. Here’s what I’ve tried so far: document.getElementById(“#dealer-selection-” + elm.id).click(); This makes the radio button show […]

Set default value for radio button in WP Alchemy custom meta box?

I’m using the WP Alchemy Metabox PHP class (www.farinspace.com/wpalchemy–metabox/) to add a custom meta box with a radio select to a custom post type. The code below shows the code I’m using for the meta box, which works great. Does anyone know how I could set the first value, ‘none’, as default checked? <label>Feature project […]

Click a radio button must set textfield value

I have these radio-buttons in my checkout page: <input id=”95292″ type=”radio” name=”GLSShop” value=”95292″ onclick=”SaveShopID(‘95292’)”> <input id=”95064″ type=”radio” name=”GLSShop” value=”95064″ onclick=”SaveShopID(‘95064’)”> <input id=”95403″ type=”radio” name=”GLSShop” value=”95403″ onclick=”SaveShopID(‘95403′)”> When user click e.g. button no. 2 I want the value of a textfield to be set to ‘95064’ I was thinking about making a java- or jqueryscript something […]

show/hide div with simple jQuery script

I want to show/hide contents by using radio buttons on a WordPress page. When a user clicks on the radio button with label “red”, the corresponding div with the class “red” needs to show up. Here’s the (working) example I’m trying to integrate: http://www.tutorialrepublic.com/codelab.php?topic=faq&file=jquery-show-hide-div-using-radio-button In WordPress, I’ve placed this in the custom CSS of my […]

Foreach loop not working as expected – custom tables and references while submitting a form

I have two custom tables and i would like to have a form submission with the name of the redskabs tables to make an reference to my registreringer table. But im confused to how foreach is working in this example. CREATE TABLE $table_registreringer ( reg_id INT UNSIGNED NOT NULL AUTO_INCREMENT, dato TIMESTAMP DEFAULT CURRENT_TIMESTAMP, billedeURL […]

Using radio button meta data from a custom meta box

Very new to attempting PHP and am hacking together my first plugin using tutorials.. I have a custom meta box with a Yes/No radio button on all WordPress pages (in the editor). EDIT- I removed the original code. See below. So.. my question is, how do I check to see which of the two buttons […]

Get value of contact form 7 radio button

I have following radio buttons in contact form 7 and a few text fields and hidden fields. [radio radio id:radio label_first “3” “6” “9” “12”] Following are a few example lines of code in functions.php. I am able to get all the other values e.g text fields and hidden fields but not radio buttons. function […]

Add get_option to jquery

I have created a settings page that contains various radio button options for a custom plugin. A radio button I’ve created is to ‘display dots’ with the values yes or no. I can get use the value any other time except in the jQuery function below. I would like to get the value of the […]

radio button is checked but display not check

im trying to save different value of radio buttons on same name, it works and was able to make checked appear if the correct value is saved. As you can see on the screenshot ABOVE (which is taken on view-source:), it the correct selected input is CHECKED already however even if it’s check you can […]

How to add checkbox and radio button in Profile Page

I liked to customize my profile page by adding new fields to get more info from the user like “Gender” or “Speaking Languages”. I managed to get the text input form to work, the problem I having now is on the radio and checkbox type of input. Here is my code: function my_user_field( $user ) […]