Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

UserForms 0.2


Go to End


185 Posts   48302 Views

Avatar
draft

Community Member, 57 Posts

13 November 2009 at 8:17pm

Hi Willr,

I have user form working, but i have question regarding the implementation with Swfupload.

So beside the field's i define on the admin, i also put a swfupload field there, so user can upload file, but the thing is, the live javascript validation is not working anymore (the field i have set as required on the admin ), what happened is the file being browse is uploaded to the server, and then it redirect again to the form with the error to the field that i set as required.

I was hoping if there are field that's not filled, it will still gave the javascript error when clickin submit.

Looking forward to your help willr.

Thx.

Avatar
jodamo5

Community Member, 9 Posts

14 November 2009 at 5:54pm

Edited: 14/11/2009 5:57pm

Hi willr. On my "user defined form" I can't add any fields when on the "form" tab. Whatever field type I choose from the drop down, when I click "add" it says "Error Creating Field". (The error appears at the bottom of the page. It first says "Adding New Field" and then changes to "Error Creating Field")

Here's the background detail:
I am running Silverstripe 2.3.2. I have Mollom v0.2 and SpamProtectionv0.2 installed. I had userformsv0.1 installed and working fine, but I needed to upgrade to v0.2 it to use the Mollom captcha and over features of v0.2.

I had some trouble upgrading, so in the end I uninstalled userforms altogether and then installed userformsv0.2 from scratch. (I used the daily build: trunk-r91579).

Now in the admin interface I can choose to create a "user defined form". It creates the form in the menu, but when I click on the "content > form" tab to add fields, it says "Adding New Field" and then gives that error - "Error creating field".

Another thing that I noticed, (that may or may not be a symptom), is that on the "content > main" tab, where I can edit the text that goes above the form, it now has the text "$UserDefinedForm" in the WYSIWYG editor. This wasn't there when userformsv0.1 was running. Is this something new to v0.2? Or is it a symptom of the problem?

Thanks!

Avatar
Willr

Forum Moderator, 5523 Posts

14 November 2009 at 6:13pm

This could be because you are running 2.3.2. I can't verify this but I userforms might require something that was added in 2.3.3.

You can see what the 'actual' error is if you have firebug enabled and devmode enabled in silverstripe it will show the error message in the console panel of firebug (or it will display in your apache / php error logs). If you get your hands on that it might be useful information

Avatar
jodamo5

Community Member, 9 Posts

14 November 2009 at 11:41pm

Hi Willr. Thanks for the speedy reply ... even on the weekend!

Here is the error details. (The error email had this section in red, then a much longer section in white after it. If you need the longer error info too, just let me know).

Error at sapphire/core/model/MySQLDatabase.php line 400 (http://www.mysite/admin/EditForm/field/Fields/addfield?NewID=1&Type=EditableTextField)

Error: Couldn't run query: insert into `EditableFormField_versions` SET `ClassName` = 'EditableTextField', `CanDelete` = 1, `ShowOnLoad` = 1, `LastEdited` = now(), `Created` = now(), `Name` = null, `Title` = null, `Default` = null, `Sort` = '0', `Required` = '0', `CustomParameter` = null, `ParentID` = '0', `CustomErrorMessage` = null, `CustomRules` = null, `CustomSettings` = null, `Version` = 1, `RecordID` = 44, `AuthorID` = 2 Unknown column 'CustomParameter' in 'field list'
At line 400 in /var/www/mysite/sapphire/core/model/MySQLDatabase.php

That's all way over my head, but I hope it makes sense to you! What do I have to do to fix the error?

Thanks!

Avatar
Willr

Forum Moderator, 5523 Posts

15 November 2009 at 9:26am

Ah yes this is an issue where in UserForms 0.2 I removed that field from the database as it was no longer required but SilverStripe likes to try and believe its still there.

The easiest way to fix this you need to go into PHPMyAdmin, select your database, select the 'EditableFormField' table on the left, Select the 'Structure' tab in the main part then delete the 'CustomParameter' row in the structure table.

Or you can run the following query on your mysql database (in PHPmyadmin, select the database you're using, then the SQL tab)

ALTER TABLE EditableFormField DROP COLUMN CustomParameter

Avatar
jodamo5

Community Member, 9 Posts

15 November 2009 at 5:41pm

Perfect!! Dropping that column solved the problem instantly. Thanks so much willr. Expert advice!

Avatar
Chip Designs

Community Member, 15 Posts

23 December 2010 at 1:36pm

Hi Willr,

Im using SS 2.4.3 with the userforms module 3.0. The form is standard with no captcha. It was working fine on my local machine and sub-domain for testing. Now that I'm going live it is no longer working in CMS. It was working and sending emails on the website, but when i tried to access the form through the CMS i got the following errors:

CMS
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 491520 bytes) in /home/chefsedg/public_html/silverstripe-cache/.cache.sapphire.templates.ComplexTableField.ss on line 604

FIREBUG
994:
missing ; before statement
<br />
<b>Fatal error</b>: Allowed memory size of 33554432 bytes exhausted (tried to allocate 256 bytes) in <b>/home/chefsedg/public_html/sapphire/forms/HtmlEditorConfig.php</b> on line <b>305</b><br />
http://www.chefsedge.com.au/cms/javascript/LeftAndMain.js?m=1293055860
Line 490

I have tried unistalling, dev/build the admin and site after uninstall and re-installing a few times. My php memory is set to 128M and cant seem to find an answer anywhere.

Any ideas?

Cheers,
Rob

Avatar
Willr

Forum Moderator, 5523 Posts

1 January 2011 at 6:32pm

My php memory is set to 128M

That error would suggest otherwise. Its saying you only have 32mb which is too low.