Forum Index >  glFusion >  glFusion Add-on, Plugin Support New Topic Post Reply
 Forms plugin - edit submitted fields
   |  Printable Version
By: ivsi (offline)  Feb 15 2011 00:39 am (Read 735 times)  
ivsi

Hi Lee,
I can't edit submitted field (beta 0.1.2; index.php see forum/viewtopic.php?forum=29&showtopic=33254).
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

Group Comfort
Level:
: +4

Registered: 11/11/09
Posts: 94
Location: Prague, Czech Rep.

Profile Email    
  Quote
By: Rocky (offline)  Feb 16 2011 18:57 pm  
Rocky

I can reproduce the error.

Sam

Forum Active Member
Active Member

Group Comfort
Level:
: +5

Registered: 01/08/06
Posts: 562

Profile Email    
  Quote
By: lgarner (offline)  Feb 16 2011 22:42 pm  
lgarner

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

Group Comfort
Level:
: +52

Registered: 06/10/08
Posts: 1913

Profile Email Website  
  Quote
By: ivsi (offline)  Feb 16 2011 23:19 pm  
ivsi

Thanks very much, I'm looking forward.
Ivan

Forum Regular Member
Regular Member

Group Comfort
Level:
: +4

Registered: 11/11/09
Posts: 94
Location: Prague, Czech Rep.

Profile Email    
  Quote
By: Rocky (offline)  Feb 16 2011 23:37 pm  
Rocky

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

Group Comfort
Level:
: +5

Registered: 01/08/06
Posts: 562

Profile Email    
  Quote
By: lgarner (offline)  Feb 17 2011 11:07 am  
lgarner

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

Group Comfort
Level:
: +52

Registered: 06/10/08
Posts: 1913

Profile Email Website  
  Quote
By: Rocky (offline)  Feb 17 2011 16:12 pm  
Rocky

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

Group Comfort
Level:
: +5

Registered: 01/08/06
Posts: 562

Profile Email    
  Quote
New Topic Post Reply


 All times are CDT. The time is now 06:45 pm.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic w/ New Post Sticky Topic w/ New Post
Locked Topic w/ New Post Locked Topic w/ New Post
View Anonymous Posts 
Able to Post 
HTML Allowed 
Censored Content