By: ivsi (offline)  Feb 15 11 @ 12:39  (Read 1010 times)  

Hi Lee,
I can't edit submitted field (beta 0.1.2; index.php see .
When I open submitted form as admin (Forms -> Results -> Edit ) I can overwrite (edit) fields. After that "Submit" writes into gl_forms_values table new (edited) fields but old fields remain unchanged. Because of this new Forms->Result shows unchanged results.
In addition I have occured many lines in error.log, something like

Po 14. únor 2011, 22:05:12 CET - id='2' AND (owner_id='2' OR group_id IN (34,2,24,25,14,4,33,11,26,13,12,37,10,1,3,5,6,9,8,35,29,18,28,30,19,38,20,21,22,23,27,31,15,16,17))

Have you any idea?
Ivan

   
Forum Regular Member
Regular Member

ivsi



Group Comfort
Level:
: +5
Registered:: 11/11/09
Posts: 119
Location: Prague, Czech Rep.
By: Rocky (offline)  Feb 16 11 @ 6:57   

I can reproduce the error.

Sam

   
Forum Active Member
Active Member

Rocky



Group Comfort
Level:
: +5
Registered:: 01/08/06
Posts: 605
By: lgarner (offline)  Feb 16 11 @ 10:42   

The log messages are debugging messages that were left in. You can edit public_html/admin/plugins/forms/index.php and remove the line that looks like "COM_errorLog("id='$frm_id' ". $perm_sql);" on line 67.

As for the editing, that looks like something that got caught up in the changes in the admin area. I can't reproduce it in dev, so try the new release when it comes out pretty soon. Just a little polishing to do.

   
Forum Admin
Admin

lgarner



Group Comfort
Level:
: +53
Registered:: 06/10/08
Posts: 2124
By: ivsi (offline)  Feb 16 11 @ 11:19   

Thanks very much, I'm looking forward.
Ivan

   
Forum Regular Member
Regular Member

ivsi



Group Comfort
Level:
: +5
Registered:: 11/11/09
Posts: 119
Location: Prague, Czech Rep.
By: Rocky (offline)  Feb 16 11 @ 11:37   

Considering form layout flexibility and appearance enhancement, I wonder if it is possible to execute a new staticpage after a form is created, so that the form layout can be modified in staticpage using the Advanced Editor's form feature. Or, some way to integrate with FCKeditor for a more flexible form layout editing.

Currently, I can copy the html codes of the form and put it in a staticpage to reformat it to make it look good. Even having a button to show the html codes of the form section on a popup window would allow copying the codes and pasting it in staticpage for reformatting.

Thanks!

Sam

   
Forum Active Member
Active Member

Rocky



Group Comfort
Level:
: +5
Registered:: 01/08/06
Posts: 605
By: lgarner (offline)  Feb 17 11 @ 11:07   

I've added an option to show the HTML code from the form template in a new window so you can copy & paste what you want. You can also use the advanced editor to create the form, as long as you use the same field names. You'd still need to define the form in the plugin so it knows how to handle the fields. Especially for date & time fields, where there are multiple fields to create one value.

One simple option, if you want to simply create forms in the advanced editor, might be to create a generic form-handler similar to what's offered by your hosting provider. It would just be a publicly-accessible PHP file that reads all the $_POST variables & emails them somewhere, or stores them.

The forms plugin works a little differently. When a form is submitted it doesn't immediately consider the $_POST variables (except the form ID). It iterates through the field definitions, checking for the type of field & other options, validates the input & creates the values to save. In the case of a date field, for instance, it needs to know that "birthday" is a date field. It then checks $_POST for birthday_month, birthday_day, and birthday_year variables and assembles them into YYYY-MM-DD to be stored in a single varchar-type field. Similarly, checkboxes are always stored as zero or one. It's from the field definition that the form can display "Yes" or "No". I think these types of handlers would be hard to do if you only had the form and not the definitions.

   
Forum Admin
Admin

lgarner



Group Comfort
Level:
: +53
Registered:: 06/10/08
Posts: 2124
By: Rocky (offline)  Feb 17 11 @ 4:12   

Thanks for the informative reply. I have been learning the difference of the two kinds of forms lately, and understand what you are talking about. It's quite fascinating and I love what you have accomplished so far.

Thanks!

Sam

   
Forum Active Member
Active Member

Rocky



Group Comfort
Level:
: +5
Registered:: 01/08/06
Posts: 605
7 posts :: Page 1 of 1