Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

form_select let's layout explode


Print Track
when i add a form_select it is placed outside of the window at the right.
form_text elements are placed as expected.

i added a screenshot and this is the code i use to create:

    $item = dbarray(dbquery("select * from " . DB_SF_ITEM . " where id=$id"));
    $output = openform("save_item","POST",clean_request("site=item", array("aid"), TRUE), array("class" => "m-t-20"));
    $output .= form_hidden("id", $item["id"]);
    $output .= form_text("name", "Name", $item["item_name"])."<br>";
    $output .= form_select("type", "Type",$item["item_type"],array("options"=>array(
        1 => $locale["sofu_item_type_1"],
        2 => $locale["sofu_item_type_2"],
        3 => $locale["sofu_item_type_3"],
        4 => $locale["sofu_item_type_4"],
    )))."<br>";
    $output .= form_text("cost", "Cost", $item["item_price"], array("type"=>"number"))."<br>";
    $output .= form_checkbox("active", "Active", $item["item_active"])."<br>";
    $output .= form_button("save_item", "Update", "Update");
    $output .= closeform();
    opentable($locale["sofu_admin_item_edit"]);
    echo $output;
    closetable();
mawe4585 attached the following file:
form_select_placement.png [13.14kB / 87 Downloads]

6 replies

Add options parameters width

$option = array (
"width"=>"100%" //default is 250px
"required"=>false,
);
Doesn't solve the problem, it only makes the select larger.
However i found out it has something to do with the style-part "display: inline-block"
If i remove this in the developer console it behaves as it should.
it's part of the .select2-container selector in select2.css

have a look at the screenshots
mawe4585 attached the following file:
form_select_display_off.png [27.06kB / 68 Downloads]
form_select_display_on.png [26.65kB / 71 Downloads]
Try adding inline false to options array.
"inline" => FALSE
still doesn't work :(
is this display:inline-block really just there because of ie7?
what browsers does php-fusion 9 support? why still ie7?
well it should poof when inline false is used?
if the goal is to make the area smaller you can wrap it in a fixed div with widths specified or ju can try to fall back to smaller amount of PX instead of % based.
im using this in version 9 and it works

Example

      echo form_select_tree("figure_manufacturer", $locale['figure_417'], $criteriaArray['figure_manufacturer'], 
         array(
            "inline" => TRUE,
            "required" => TRUE,
            "width" => "400px",
            "placeholder" => $locale['figurelib-placeholder-102'],
            "error_text" => $locale['figurelib-error-102'],
            "no_root" => 1,
            "query" => (multilang_table("FI") ? "WHERE figure_manufacturer_language='".LANGUAGE."'" : ""),
            "maxselect" => 1,
            "allowclear" => TRUE,
         ),
author mawe4585
forumPHP-Fusion Dynamics - 9
replies7 posts
viewed1810 times
activeLast updated on 3 years ago

Related

Oh, charset coding has an influence to layout
Started by
D
Drbo - 2 posts
Long characters in post adjusting themes width & layout!
Started by
I
IpHeX - 12 posts
7.00.7 News preview with larg:ish image breaks preview layout
Started by Homdax Homdax - 1 post
Footer placement in tableless layout
Started by KonickMultimedia KonickMultimedia - 4 posts
Weird forum (viewtrhead) layout issue
Started by lelebart lelebart - 9 posts
PHP-Fusion layout discussion
Started by Hal Ricard Hal Ricard - 18 posts

Hot Questions

karrak
Forum Mood multilocale
karrak - 4 posts
M
karrak
C
Bootstrap Grid - merge lines
Catzenjaeger - 3 posts
C
Bootstrap - empty columns problem
Catzenjaeger - 3 posts
C
Bootstrap - input-group-addon
Catzenjaeger - 1 post
You can view all discussion threads in this forum.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
Users who participated in discussion: Falk, Catzenjaeger, Chan, mawe4585