Hi Ken,
Thank you for your response. The form builder is a app where a user
can build a form online and then save it. I am generating the js
validations based on the users selection of properties like isValid
etc while building the form online.
I have noted down your suggestions - valid though.

I need some more design related ideas based on the options I
mentioned :)
Thank you very much
Paul

On Feb 7, 10:21 pm, kdubya <kenwin...@winanstech.com> wrote:
> Paul,
>
> I, for one, don't understand what you are trying to do. Why is the
> "user" selecting a textbox? Is this an end user/ Or is it a client-
> type user (someone building their website)?
>
> You say this is your first time using CakePHP so the following might
> be of help:
>
> In CakePHP much on the drudgery of building forms can happen
> automagically if you follow conventions. In general, the type of from
> element (input, textbox, radio button) is dependent on the datatype of
> the corresponding field in the database and hence the model.
> FormHelper reads the DB schema and can automatically generate the
> correct form elements. You should look over 
> this:http://book.cakephp.org/view/189/Automagic-Form-Elements
>
> I think you should be able use to the FormHelper extensively (your
> option c). In your option (d) you mention doing validation in JS.
> CakePHP is setup to do validation via the model in PHP. 
> See:http://book.cakephp.org/view/125/Data-Validation
>
> I have created my own form builder helper that build upon the features
> of CakePHP (FormHelper mainly) but adds formatting and hints to each
> form element. It makes use of arrays that I add to each model:
> skipField, hiddenField, and fieldHint.
>
> skipField - if a field name is included in this array, my helper skips
> it. i.e. there is no form element generated for this field (ex.
> page_id - a field that is part of a belongsTo relation which the user
> should never change)
>
> hiddenField - a field like 'id' that is needed to be passed as a
> hidden form element. The existing value from the DB is made a "hidden"
> form element.
>
> fieldHint - Any explanatory text/instructions for the user as they
> fill out the form.
>
> HTH,
> Ken
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to