I'm attempting to add new options to the Form handler for cakephp
1.2.5.
So far i've been able to edit cake/libs/view/helpers/form.php
Adding
function email($fieldName, $options = array()) {
$options = $this->_initInputField($fieldName, array_merge(
array('type' => 'email'), $options
));
return $this->output(sprintf(
$this->Html->tags['input'],
$options['name'],
$this->_parseAttributes($options, array('name'), null, ' ')
));
}
function url($fieldName, $options = array()) {
$options = $this->_initInputField($fieldName, array_merge(
array('type' => 'url'), $options
));
return $this->output(sprintf(
$this->Html->tags['input'],
$options['name'],
$this->_parseAttributes($options, array('name'), null, ' ')
));
}
At line 970 just below the text input box.
I also added
,
'url' => 'text', 'email' => 'text'
To the end of the map array on line 608
Finally
case 'email':
case 'url':
To line 776.
I'm curious if this was the correct way or there would be a method to
add this to an extended help handler?
Although after doing this, it does display the url/email input boxes
however it comes with an error.
Notice (8): Array to string conversion [CORE/cake/libs/view/
helper.php, line 330]
Any pointers would be greatly appreciated
Thanks,
Dave
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment