Keep radio buttons with their labels on line breaks

This topic contains 8 replies, has 4 voices, and was last updated by  oldmankit 8 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #190616

    oldmankit
    Buyer
    Post count: 116

    According to the accepted answer to this stack exchange question, the way to keep buttons with labels (not broken across lines) is to wrap each input/label pair in a span.

    Currently this is not possible, AFAIK. Geodirectory gives us this:

    
    
    <div class="required_field geodir_form_row clearfix gd-fieldset-details" id="geodir_availability_row">
    	<label>Lorem ipsum dolor <span>*</span></label>
    	<input type="radio" field_type="radio" class="gd-checkbox" value="1" checked="checked" id="geodir_availability" name="geodir_availability">Lorem ipsum dolor
    	<input type="radio" field_type="radio" class="gd-checkbox" value="0" id="geodir_availability" name="geodir_availability">sit amet					
    	<span class="geodir_message_error"></span>
    </div>

    The label just goes right after the input, and I can’t see any way to stop it breaking across lines.

    Even if we can’t wrap the input/label pair in a span, it would be great if the label itself had its own span class and id.

    #190808

    Guust
    Moderator
    Post count: 29970

    Can you give the URL of the page with that code please. Thanks.

    #191904

    oldmankit
    Buyer
    Post count: 116

    Sure. It’s the add listing page on my site: It’s http://reikiconnect.org/add-listing/?listing_type=gd_place

    The radio buttons in question are labelled “Currently Accepting New Clients / Not Currently Accepting New Clients”

    #192325

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    we can’t see the add listing page without being logged in. Please provide admin credentials.

    Thanks

    #194128

    oldmankit
    Buyer
    Post count: 116
    This reply has been marked as private.
    #194382

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I asked Stiofan to have a look. I don’t think it can be done without modifying the HTML of radio inputs.

    We’ll let you know asap.

    Thanks

    #194860

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I have added spans around them with class gd-radios, this will be in the next version, you will have to make them display block to have what you want.

    Stiofan

    #195551

    oldmankit
    Buyer
    Post count: 116

    Thanks so much, Stiofan, that’s perfect!

    #220938

    oldmankit
    Buyer
    Post count: 116

    This is working perfectly now, thank you.

    
    
    /* This keeps radio buttons with their labels*/
    .gd-radios {
    	display: block;
    }
    
    /* Space between button and label */
    input.gd-checkbox {
    	margin-right: 7px;
    }
Viewing 9 posts - 1 through 9 (of 9 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount