The CSS-Horror

In the documentation "http://fabrikar.com/wiki/index.php/3.x_Form_Templates" -
Styling a single form element

is written:
Use a copy of the "contacts_custom" template to display single elements in positions and styles as you need.
Elements in this template are called by name, so it's only to be used by the form containing this elements

I cant find that, why contacts_custom is not exists!
OK, I have make before an custom_template, why I have copied the template_bootstrap!

The same in documentation is wrong:
Copy:
components/com_fabrik/views/form/tmpl/default/
to:
components/com_fabrik/views/form/tmpl/mytemplate/

but this works fine for forms, only the documentation is wrong!
Then I have select in the form for both front_end and back_end and for both view and form to the custom_template, what I have copied from the bootstrap folder.


Now my meaing was, I can set here in this custom_template-Folder in a file template.css or custom.css (I have copied from the template.css) the style settings of one element - but it will not been work! Again a horrable documentation ... sorry!

The template_css.php and custom_css.php has now the same:

PHP:
<?php
header('Content-type: text/css');
$c = (int) $_REQUEST['c'];
$view = isset($_REQUEST['view']) ? $_REQUEST['view'] : 'form';
echo "
 
.fabrikGroup {
clear: left;
}
 
#{$view}_$c #reservierung___annahme {
  border:1px solid red;
  width:500px;
}
 
";
?>

In the form I have this for this select box, I will change:
HTML:
<select id="reservierung___annahme" name="reservierung___annahme[]" class="fabrikinput inputbox">
    <option value="Testingort" selected="selected">Testingort</option>
    <option value="anderer Ort">anderer Ort</option>
</select>

So, what I doe wrong - and can you please edit the documentation a little bit better?! - Only 100 words can been enough to short the time for all other programmers!

Many thanks

Detlef
 
The WIKI is correct for Fabrik3.0.x

Fabrik3.1 is a Beta version and as you've found the WIKI doesn't yet cover the new bootstrap layout/CSS...
I just tested, custom_css.php is loaded but it seems the form is something like
form_2_1 (so maybe #{view}_$c_1 in custom_css.php)

Try with
select#reservierung___annahme {
border:1px solid red;
width:500px;
}


or
#{$view}_$c_1 #reservierung___annahme {
border:1px solid red;
width:500px;
}
 
Hola Troester,

thanks for your information and I have a new question about this:

The first code with select#reservierung___annahme works fine. Your second code block not works. I have test before too this and this is working too, but I am not sure, is that a good possiblity:

PHP:
#reservierung___von_stunde {
  border:1px solid red;
  width:500px;
}

An other Question is, I will move the fields and Labels to different positions. I need more fields in 2 lines expl.:

Field 1 Field 2 Field 3 Field 4
Field 5 Field 6 Field 7 Field 8

- but I will set the positions absolute exact. In an old project with fabrik 2.x their was one possibility to set in the form or where ever: "how many fields (elements) will been show in one row". In the new version I cant find this. Other is, you have an other idea, that I can format and set the fields individual?

Many Thanks

Detlef
P.S. I give you a parcel for this, I will add an avatar from me
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top