public static function _init()
{
static::$_properties['address']['form']['placeholder'] == __('profile.street');
}
'field_template' => "<div class=\"{error_class}\">{label}{required}{field}<small>{error_msg}</small></div>\n"
Thank you so much for your help! Oops. That looks like a typo...nakp wrote on Wednesday 1st of August 2012:Thank you, thats a workaround, why two == signs? I've used only one xD
Ok, I get you. If you don't have labels you need to define custom error message using the get_message() method on the validation error object. In the template you can add html surrounding {error_msg} to allow you to position them using css. To put them below the input I use a "float:left" on them and push them down a bit, but ymmv...nakp wrote on Wednesday 1st of August 2012:Labels are used for validation messages as far as I know but for some fields, I don't have labels but placeholders Error messages are supposed to be shown below inputs
So how would I pass the fieldset to the view to be parsed?
$data = Fieldset::forge('profile')->add_model('Model_Client');
Controller
I'm using css and I'm not tables friend
// init the formdata array
$formdata = array();
// ... some code here
// repopulate from posted input
$formdata = array_merge($formdata, \Input::post());
// and pass it to the form
return \View::forge('myview', array('formdata' => $formdata));
<?php echo Form::input('fieldname', \Arr::get($formdata, 'fieldname', 'default value if not present'));
so use Arr:get() to simulate CI's set_value() functionality.
I would not use the Input class in your views, as input data will not be escaped like data passed to the view. This may be a security issue, and require you to escape manually, using the e() helper.
thank you!!! I wasn't thinking about using Input in my views, but using Session
I still have a problem and I think it might be Smarty or Parser package
$view = View::forge('clients/add.smarty');
$view->set('data', $data, false);
return $view;
It looks like you're new here. If you want to get involved, click one of these buttons!