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.
Not a member yet? Click here to register.
Forgot Password?

form_select let's layout explode

Asked Modified Viewed 3,316 times
M
mawe4585
M
  • Member, joined since
  • Contributed 84 posts on the community forums.
  • Started 34 threads in the forums
  • Started this discussions
asked
Member

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 [No information available / 217 Downloads]
0 replies

6 posts

C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

Add options parameters width

$option = array (
"width"=>"100%" //default is 250px
"required"=>false,
);
0 replies
M
mawe4585
M
  • Member, joined since
  • Contributed 84 posts on the community forums.
  • Started 34 threads in the forums
  • Started this discussions
answered
Member

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 [No information available / 191 Downloads]
form_select_display_on.png [No information available / 195 Downloads]
0 replies
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Try adding inline false to options array.
"inline" => FALSE
0 replies
M
mawe4585
M
  • Member, joined since
  • Contributed 84 posts on the community forums.
  • Started 34 threads in the forums
  • Started this discussions
answered
Member

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?
0 replies
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

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.
0 replies
C
Catzenjaeger
C
  • Senior Member, joined since
  • Contributed 408 posts on the community forums.
  • Started 137 threads in the forums
answered
Senior Member

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,
         ),
0 replies

Category Forum

PHPFusion Dynamics - 9

Labels

None yet

Statistics

  • Views 0 views
  • Posts 6 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

F
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
C
C
  • Senior Member, joined since
  • Contributed 408 posts on the community forums.
  • Started 137 threads in the forums
C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
M
M
  • Member, joined since
  • Contributed 84 posts on the community forums.
  • Started 34 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet