Saving wrong date / Problem with Quotes / 2 form elements in one row

Status
Not open for further replies.

Roland

Member
Hi there,

I got three problems:

  • When I define a form element as Element type "date" an change the "Date-format-string" from Y-m-d to d.m.Y (German format) I get a wrong result on saving the record.
    E.g. 07.05.2007 results 20.05.2020 on saving. Can I change the date-Format generally or is the a possibilty to convert it the right way?
  • When text-fields in my tables quotes (“) I get problems with the display in the form and also on saving because the value is delimited by quotes too. Can I change “ into " on loading the form?
    Example (see the red quotes causing trouble):
    <input class="inputbox text" type="text" name="gw_aufsaetze___afstitel" size="100" maxlength="255" id="mf_el_gw_aufsaetze___afstitel" value=""...ich wünschte, ein Bürger zu sein". Zum Selbstverständnis des deutschen Bürgertums im 19. Jahrhundert" />
  • How can I format forms and place more than one input fields in a row?
    The file elements.html in my template folder contains a </tr> after every element. Can I create an dynamic function that keeps e.g. surname and name in one row?

Thanks for help
Roland
 
Hmmm, is there no one who can help me on my questions? :-[

There are more problems with the version 1.0.4.
  • When I edit a field in "Edit Form Element" and activitate the checkbox "Allow ordering of this column in table view" than fabrik changes the fieldsize of this field to 255 signs and NOT NULL when I check it with phpMyAdmin. I think ordering should definetely not change my fields in the database without asking me!
  • I also don't understand why the ordering works on some fields an not an other fields in the table view which are defined the same way.
    E.g. a simple field containing a year with 4 signs doesn't get ordered ...


I really would need support on this five questions including my first post.
By the way, I don't know why my status is Supporter - I am subscriber.
Thank you.
 
Well sadly the problem with altering the table seems directly related with how they call the code to create a table from scratch. It's actually a bit worse since generating the table from the database causes all of the elements to to default to one of three data types, char(255), datetime, or text, and you have to customize all of your elements to get back to compatible settings. The way I have been working is generating the table, changing the elements to similar types (Number for indexes etc., sizing text max size etc. ) then blowing away the tables and restoring my original schema. Obviously this should ONLY be done on a development environment and with a full backup of your tables and structures. Fabrik seems to work just fine with the original data types.

The other gotcha is that if you need a second view you are supposed to copy and paste all of your settings which can potentially add fields like copy_of_field4 to your table. The way I have been creating alternate views on forms and tables is to export the Fabrik tables without the alter statements or data, and then import them again. This creates a full copy of all the elements, forms, groups etc but with new Fabrik ID's so your elements aren't changing your table structures.

So the easy question is have you set all your element types, including the type Number for number based items like ID's ?

The answer to your question getting form elements on the same row is to create a custom template and adding it to your com_fabrik/tmpl/form directory (Make a copy of div_div ).

As for the date format that is specified in the element itself, your date format is dependant on the mySql configuration underneath. What version of mySql are you running? Do you know what charactor set it is etc?
 
Hi Andre,

thanks for your answer.

  • Changing table fields: Your answer helps me to understand and I can act knowing what's going on here - solved
  • Problem with quotes in the data: it was solved by Rob yesterday and it works with the patched files - solved
  • Problem with date format: I will concentrate on this problem later - solved
  • I did not see (better: not understand), if you answered my question of sorting the table view by clicking the column header.
    If this was your answer: "So the easy question is have you set all your element types, including the type Number for number based items like ID's ?" I have to say that some fields that I would like to order are defined as numbers like the id and some are defined as text in the "Edit Form Element" of fabrik.
    For me it looks that there are three status of order "asc", "desc" and "-" when I have a look at the Link in the header column. Could it be that "-" resets the last ordering?
  • Creating own template: It seems that I am too stupid: trying to follow the PDF-Manual rev. 1.0.1 on page 55 failed.
    I used the template "bluesky" and copied it to a folder in /tmpl/form/owv_buecher/form.html (file is attached).
    The variables {GROUP3_NACHNAME_LABEL} and {GROUP3_NACHNAME} don't work, nevertheless I tried to use the correct names.
    To verify the variable names I used <mos:var name="fabrik_templatevars" /> to get them displayed. I get e.g. GROUP3_NACHNAME_RO, GROUP3_NACHNAME and BUECHER_NACHNAME
    What is wrong with my template?

Roland
 

Attachments

  • form.html
    7 KB · Views: 259
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top