Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages12>
HTML Form features
dgt
#1 Posted : Thursday, April 22, 2010 7:56:12 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 1/21/2010(UTC)
Posts: 69
Location: London
Hi,
I tried to use the HTML form, but it didn't quite fit my needs. It'd be great to have:

- Specify SMPT server by URL, username and password, instead of IP.
- Specify success and error redirect pages by url with parameters after sending.
- Form data validation, specially email.

Francesc
GazNewt
#2 Posted : Friday, April 23, 2010 3:25:05 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
I am halfway through changing this module, I should be able to get these changes in next week sometime
dgt
#3 Posted : Friday, April 23, 2010 4:46:59 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 1/21/2010(UTC)
Posts: 69
Location: London
GazNewt
#4 Posted : Monday, May 03, 2010 3:52:45 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
Still not got round to this sorry, I'm working on other things on the moment but intend to get onto this at some point
dgt
#5 Posted : Friday, June 18, 2010 4:12:09 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 1/21/2010(UTC)
Posts: 69
Location: London
GazNewt wrote:
Still not got round to this sorry, I'm working on other things on the moment but intend to get onto this at some point


Hi GazNewt,
have you done any progress on this? I don't mean to push, it's just to have an update.

Thanks
GazNewt
#6 Posted : Saturday, June 19, 2010 6:45:10 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
Hi dgt, this is still in my to-do list. I need it for my contact page. I have two weeks off coming up in June/July it should be done by then since my own web site needs to be up and running by then with a contact page. Looking at the list of changes you have they weren't in my original plan, I just wanted to update it so that it would work with yahoo/gmail so I can't guarantee you'll get them all. Time is very tight for me at the moment but if you expand on what you want I'll certainly take a look at doing them while I'm there
dgt
#7 Posted : Monday, June 21, 2010 5:43:48 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 1/21/2010(UTC)
Posts: 69
Location: London
Hi GazNewt,
sounds good. I'm using google apps as email service, so if it supports gmail, it'll be grand.
Regarding the other requirements:
- I'd like validation (client side if possible or server side otherwise) to make sure that required fields are not empty and the email address is in a valid email format.
- To inform the user that the form was successfully submitted, maybe it could reload the same page passing a url parameter so that a thank you page can be displayed instead of the form? I'm not sure here...It can't be a hardcoded full url, because it wouldn't work for me in a multi language site.

I'll be happy to try your new version. I haven't tried any module development, if I have time and I see how, I will try to contribute.
GazNewt
#8 Posted : Monday, June 21, 2010 6:57:38 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
Ok I'll try to get this stuff in
GazNewt
#9 Posted : Tuesday, July 20, 2010 8:10:00 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
Am on this now. I got everything in tonight except the validation which I'm doing tomorrow. By the way you can already set up a Thank You page when the form is submitted, see the "Other Settings" fieldset when editing a HtmlForm

Any more requests for the form module???
dgt
#10 Posted : Tuesday, July 20, 2010 8:14:44 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 1/21/2010(UTC)
Posts: 69
Location: London
Sounds good. I can't think of anything else now.

As soon as it's ready and I have some time I'll try it and I'll give you feedback.

Many thanks!
GazNewt
#11 Posted : Wednesday, July 21, 2010 4:17:24 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
I've realised that the best approach here is a validation module and plugin that you can use whenever you are taking data entry from your own pages rather than the extjs backend. The validation rules in Kooboo only seem to apply to the extjs back end and not the API (server side).

The module will let you create validation "sets" that contain a list of request names and associated validation (regular expression etc.) and the plugin will perform the server side validation and generate errors that the module handling the data entry form will pick up.

The module will also be used to plug in javascript so there is client side validation. I could really use this in one of my modules, as well as the html form module so I'm going to do it this way rather than a quick approach that only works with the htmlform module

In other words, it won't be done tonight!
dgt
#12 Posted : Wednesday, July 21, 2010 5:10:58 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 1/21/2010(UTC)
Posts: 69
Location: London
Developing a generic validation "framwork" makes sense. Could you not use somehow the MVC 2.0 client side validation helpers? I've only seen a small demo, but it looks powerful...
GazNewt
#13 Posted : Wednesday, July 21, 2010 5:19:38 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
I am thinking about using existing MVC validation solutions, I know a bit about them but not actually used them, not enough to give a definitive answer about how they would or wouldn't fit in. From what I've seen they rely on annotations and in a generic solution like this I don't think they'll work because there are no specific models to annotate. Generic CMS require generic solutions

If I was writing a bespoke MVC app with models and view models I would definitely use the existing validation solutions, but in Kooboo I'm not convinced they'd fit. I may be wrong and perhaps I should look into them more, but in my head I already know how to do it so I can't say it would be worth me looking.

I'll sneak in some research at work tomorrow and see if I have an "aha" moment, am always ready to be wrong and learn new ways
GazNewt
#14 Posted : Thursday, July 22, 2010 6:53:54 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
Right I'm taking a leaf out of REWORK's book, a full validation module is going to take me a while to do properly and it's not a show stopper as I can easily embed some custom validation javascript on a page for now. I'm stopping work on the validation module until after my business site is live. I realised how silly it was to spend precious time working on a full new module like this when it isn't necessary right now

This is what I have already added to the html form module :

Emails
CC address
BCC address
Enable SSL
SSL mode (implicit or explicit, most webmail servers require old implicit mode. Explicit uses System.Web.Mail, Implicit uses System.Net.Mail)
All new fields added to database and admin ui

Emails that fail to send
Log a web event as Kooboo.Module.HtmlForm.EmailException
If the content folder or sql table has an "EmailSent" property it is set to true or false depending on email success

Misc
New "SuccessfullySentEmail" parameter sent to ThankYouPage view (value is true|false depending on email success)

For validation I suggest using custom javascript, I can help with this if anyone needs it, I'll be adding such javascript to my contact page after sending this message

If anybody wants this work let me know and I'll email it to you. Perhaps once tested it can go into Kooboo itself?
dgt
#15 Posted : Thursday, July 22, 2010 7:39:08 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 1/21/2010(UTC)
Posts: 69
Location: London
This sounds amazing! Many thanks. I'm sure a lot of people will benefit from your work. I'll try to use it myself next week and I'll certainly will be interested in the javascript part.
Will you put it as a new version of the HtmlForm module so we can pull it from the Kooboo instance? Email is fine for me too. I'm very interested in seeing the code too, if you share it, as I really need to get my hands on writing kooboo modules.

Thank again
GazNewt
#16 Posted : Thursday, July 22, 2010 7:32:07 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
Yes it will go in the main HtmlForm module source if it is approved by the Kooboo guys

If you pm me your email I'll send you what I have on Sunday after I make a few more little changes I think might be useful

If you know a bit about asp.net mvc then you can create a kooboo module, there are few things you have to know but it's all documented and in the module video
Baseless
#17 Posted : Saturday, July 24, 2010 2:14:09 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 6/10/2010(UTC)
Posts: 135
Location: Sweden
Im struggling with validation as well, searching for a way to both keep server side security and providing client side validation.
Am not really friends with annotations (rolled my own stuff before) and havent seen them handle custom var inputs yet atleast.
GazNewt
#18 Posted : Saturday, July 24, 2010 4:04:40 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
Hi Baseless do you mean validation just with the HtmlForm module or validation in general when you take user input and process it with the kooboo api? Or do you mean validation in the kooboo UI when adding content?
Baseless
#19 Posted : Monday, July 26, 2010 1:05:16 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 6/10/2010(UTC)
Posts: 135
Location: Sweden
No i meant more in general terms not specifically the HtmlForm. Specifically finding the best way to getting textresource based validationerrors that is easily extended to client side validation like using the Html.EnableValidation() tag simple.
Though have progressed since last post, plan to build custom validationattributes for the Model Annotations instead and see how that works out. Never used the stock MVC annotation validatione before so its new to me.

Though if i understand correctly that you are thinking of building a validation module using the kooboo admin validation? I would be very interested to see the source for for that when you have had the timeto do some work on it (or if such code already exists perhaps).

Regarding temporary client side validation jquery validation would be a quick fix?

PS: Oh and sorry for polluting this modulespecific thread!
GazNewt
#20 Posted : Monday, July 26, 2010 1:43:56 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
I'm working on the validation module at the moment, decided that I needed it after all. I'm using the jquery validation plugin for front end validation (http://bassistance.de/jquery-plugins/jquery-plugin-validation/). A Kooboo page plugin will validate on the server side and place errors in the TempData for subsequent modules to pick up such as the HtmlForm module I'm changing also at the moment

The validation rules are stored against a ValidationSet schema which has ValidationRule child content. So the rules are just normal Kooboo content accessed by the API. I wanted to house the rules in a separate table away from the content but I failed to get the extjs admin pages working (drove me mad that did, wasted a day).

You attach the module to a page and tell it which validation sets you want to apply to the page. Not finished yet though
Users browsing this topic
Guest
2 Pages12>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.209 seconds.