Radio button and select boxes are not coming in one line

Radio button and select boxes are not coming in one line

bukamanushbukamanush Posts: 10Questions: 0Answers: 0
edited September 2013 in General
Hi, I am quite new in DataTables and need to fix a bug asap. In Data editor when I click on the new tab, I have some radio buttons and select boxes in the new model window. Now the problem is they are not coming in one row, all of them are going like one in top of another one.

For example: Registered .Yes
.No
I want them like this Registered: .Yes .No


Can any please point me to the right direction.

Replies

  • bukamanushbukamanush Posts: 10Questions: 0Answers: 0
    My code appears like this.

    $this->data['fields'] .= '{"label" : "Registered: ", "name" : "registered", "type" : "radio", "ipOpts":[{"label":"Y","value":"Y"},{"label":"N","value":"N"}], "default" : "N"},
    {"label" : "Test: ", "name" : "test", "type" : "radio", "ipOpts":[{"label":"Y","value":"Y"},{"label":"N","value":"N"}], "default" : "N"},
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    A little bit of CSS will "fix" (it is intentional as it is, so not a bug) it for you:

    [code]
    div.DTE_Field_Type_radio div.DTE_Field_Input > div > div {
    display: inline-block;
    }
    [/code]

    Allan
  • bukamanushbukamanush Posts: 10Questions: 0Answers: 0
    edited September 2013
    Hi Allan

    Thanks a lot, that solved my problem, I have another one like this.

    $this->data['fields'] .= '{"label" : "Occasions: ", "name" :"occasions", "type" : "checkbox", "ipOpts":['.$this->occasion_model->options().'], "separator": ","},';

    which doesn't come in one line (row).

    Can you also please point me to a tutorial or guideline, it seems like I have to use DataTables for my current project quite a lot.

    Thanks again. :)
  • bukamanushbukamanush Posts: 10Questions: 0Answers: 0
    It's coming like this:

    [tickbox]
    Value1

    [tickbox]
    Value2

    I want it like Value1[Tick Box] Value2[Tick Box]
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    [code]
    div.DTE_Field_Type_checkbox div.DTE_Field_Input > div > div {
    display: inline-block;
    }
    [/code]

    Currently there isn't documentation on the HTML structure that Editor creates - but it will be added with diagrams in the near future (probably as part of the v1.3 release). Until then, using your browser's DOM inspector tools will be the most instructive way of seeing what is happening.

    How's the trial going for you thus far? If you have any other questions, do let me know.

    Regards,
    Allan
  • bukamanushbukamanush Posts: 10Questions: 0Answers: 0
    Hi Allan

    Thanks a lot for your answer, actually I do have another question

    http://datatables.net/forums/discussion/17547/refreshing-the-browserwindow-to-work-the-application#Item_1

    I haven't gone far inside the DataTables yet, hopefully play more with it over the weekend..!!!

    :
This discussion has been closed.