2013-11-29, 21:44:42
(2013-11-29, 21:33:34)TeeJay Wrote:(2013-11-29, 21:16:47)kuzma Wrote: Hi, i need that this select options are taken from language file. Is it posible.
example.
select = "var1" | "var2" | "var3"
language file:
'var1' = 'bmadfkpbm'
'var2' = 'asrfgbae'
'var3' = 'sfbadgnbsfgn'
Hi kuzma,
I don't know it that would work - I guess it wouldn't.
You would have to edit the plugin itself or just add a few pieces of your own code to make this work as you want to.
I can't help with this, but maybe some deeper PHPers might
I make in code samo changes, i put in some new variable, and it work fine, now i need this translate to work on select3, and i think it must be placed here but i am short with php knowledge.
// add fields
foreach($params as $id => $param) {
$field = new P01contact_field($form, $id, $param[1]);
$field->set_title($param[4]);
if($param[1] == 'select'
|| $param[1] == 'select2'
|| $param[1] == 'select3'
|| $param[1] == 'radio'
|| $param[1] == 'checkbox'
|| $param[1] == 'calendar1'
|| $param[1] == 'calendar2') {
// fields with multiples values
preg_match_all($values_pattern, $param[7], $values, PREG_SET_ORDER);
$values = unset_r($values, 0);
$field->set_value($values);
}