1 answer
0 votes
FormHelper ignores 'class' attribute for hidden fields
When I try to pass a class attribute to a hidden field, FormHelper ignores that. My code:
<?php echo($form->input('Foo.bar', array('type' => 'hidden', 'class' => 'baz')); ?>
FormHelper::input() calls[1] FormHelper::hidden() where name and class...
3 answers
0 votes
Fieldset
I'm successfully proceeding in process of learning Cake, and now I wonder:
I have this code:
echo $form->create(false, array('url' => '/search/'));
echo $form->input('term', array('class' => 'searchBox', 'label' => false, 'div' => false));
echo... 1 answer
1 vote
Cheapest way to use models
When browsing around different cake (support) sites the thing 2 comments seem to keep coming back. Using ClassRegistry::init('Model') and lazy_model should boost the performence. But how should the 2 be used to gain a performence boost over using...
2 answers
-1 votes
Prefix Routing from Form Submission
I'm having a problem with prefix routing from a form submission.
I have several prefixes setup for my site (not just admin), lets say
prefixa, prefixb, prefixc....
I'm method for this form is "get". When submitting the form the action
is...
1 answer
0 votes
Validation summary
Hi guys,
I know that if I use $form-input(), the validation errors will be shown automatically. This is really neato, but at this moment, I need a different behavior. I want those validation errors shown like a validation summary on top of the...
3 answers
0 votes
Is select box validation possible?
I have a standard form setup which includes a $form-select select box.
My validation rules are setup so that the select box mustn't be empty.
If I leave the select box empty and try to submit the form it wont because the validation rule is stopping...
1 answer
0 votes
form helper required class for not empty fields on hasOne Model
I got a form where I submit data for multiple models.
The validation for the Database is no problem. With the
$user = $this->Employee->saveAll($this->data, array('validate' => 'first'));
all valdation Rules of other Models are checked.
Now my...
1 answer
0 votes
Form submission / data retrieval
Hello,
I'm trying to figure out how to retrieve data collected in a form. I believe there are two ways:
1) append form values to the URL with controller and action and from that extract the information
2) retrieve the data from a session object (or...
1 answer
0 votes
date options
views/index.ctp
<?php echo $form->input('neesen_ognoo', array( 'label' => 'Label'
, 'dateFormat' => 'DMY'
, 'minYear' => date('Y') - 2
... 1 answer
0 votes
A list form with search option with pagination
Hello,
I want to create a list form with some keyword search options.The list may contain many pages so the pagination is applied and the search result should be persistence in different page visit and user should be able to order the search...
1 answer
0 votes
How to validate Forms, if some fields need to be null
Hey folks,
I'm really new to CakePHP, and I must say I love it.
But now I got my first problem, and I can't find a solution at the moment.
I've got a little sytem set up, with admin routes, acl, auth and so on.
Now I want that if somebody wants to...
1 answer
0 votes
Disable Fieldset around an hidden form element
Hi,
i want to disable the fieldset around the hidden cakephp generated input field.
i reviewed http://book.cakephp.org/view/183/Creating-Forms but it's unlike to my output.
<?php echo $form->create('User', array('action' => 'login', 'class' =>... 3 answers
0 votes
how is the 'required' class added to a input field?
Have created a form but the only 2 fields that are appearing with the class 'required' added to the div are the ones that are used for my Auth component. Other fields I have look like this but when rendered, <div class="input text" is being...
2 answers
0 votes
Custom Functions / Arguments in Form Helper
I'm hoping to be able to do something like this:
echo $form-input('name', array('customAttribute' = true));
echo $form-input('password', array('description' = 'Must be at least 8 chrs long, contain a number and symbol'));
The idea is to be able to...
2 answers
0 votes
split add form
Hi,
I have an add form that has 26 fields. I'd like to make this a little more manageable and split it over 3 or four pages with tabs eg
[stage 1][stage 2][stage 3][stage 4]
and then submit the whole load of information back to the database....
2 answers
0 votes
How do I create various checkboxes for an list of items in a form?
<?php echo $form->input('CategoriaAtendimento'); ?>
This echoes a list with all the items on CategoriaAtendimento, can any1 tell how do I echo a "checkbox list" instead? plz
2 answers
0 votes
Simple search form
Hello, I am new in CakePHP and I would like to ask, how can I make a simple search form?
I am observing CakePHP convention. Simple form with one input and searching in one table and few's columns.
Result will be written out under search form like...
1 answer
0 votes
Data from one form to two tables {$belongsTo}
Hello,
I would like to ask, how can i insert values from Form, when some values from form will be store in table x, and another values from form in table y ?
Relationship between two tables is $belongsTo.
I am new in Cake and i dont know what do...
1 answer
0 votes
Label for input (or any form element)in any language
Hello,
I would like to ask,
when i have got a form input values, such as in view:
<?php
echo $form->create('Company');
echo $form->input('ico');
echo $form->input('dic');
echo $form->input('street');
echo $form->input('city');
echo... 1 answer
0 votes
Translation with setFlash, how to?
Halo, i would like use translations for flash messages, like with form:
('label' => __('company_name', true))
Is it posiible with flash messages?
$this->Session->setFlash( __('company_name', true));
Thanks for any reply