Image File form field type
Hi admin,
-----------------------------------------------------------------
this is my field definition
$fields['logo_image']['class'] = 'asset_select images/clients';
$fields['logo_image']['file_name'] = '{name}';
$fields['logo_image']['upload_path'] = assets_server_path('clients', 'images');
first problem :
file name changed to name.png , while I want it to take value of field named 'name'
second problem :
upload path and selection path is still images folder , while I want it images/clients folder
----------------------------------------------------------------------------
before this I had field named 'logo'
$fields['logo'] = array('type' => 'file' , 'is_image'=> TRUE , 'file_name'=>'{name}' , 'required' => TRUE , 'create_thumb' => TRUE);
this definition doesn't make preview for image , and doesn't make buttons "upload asset" & "select image" , it just show usual "select file" button of browser style
----------------------------------------
my fuel version is 1.3
Thanks for your time
Comments
I have another problem
If I want to create two versions of a page for multilanguage reason , I can't use the same location
also I have a form , how can I localize its labels
thank you
http://docs.getfuelcms.com/general/localization
If you are using Form_builder for your form (say as a simple module), you can create a language file and load it (perhaps via autoload) with language keys off:
$lang['form_label_{field_name}'] = '....';
http://docs.getfuelcms.com/libraries/form_builder
the form I created using form module in admin panel , admin/forms/
for localization , in the manual ,
http://localhost/about/history?lang=es
so I can create a multi version of "pages"
http://localhost/about?lang=es
http://localhost/about?lang=en
http://localhost/about?lang=ar
but "pages" said that location is duplicated even if the language is different
in the manual "Each page location can have multiple languages assigned to it" , how can I make that with admin panel "pages" , I think if there is a "translate" link it will be more helpful
thank you