Hello🙂
I have a problem with locales.
I have the page with the form and the page is going to be multilingual, so I copied original "only English" form and I'm trying to prepare it to be multilingual. Everything worked fine to some point.
I have dynamic dropdown. I'm not sure if this is the right name for it: user chooses type of tunnel and dependently on his/her choice, he/she sees different colors and lenghs. Lenghs are multilingual by definition, but colors are not. The problem is, colors are not translated... I attached you printscreens.
Any tips?
I have a problem with locales.
I have the page with the form and the page is going to be multilingual, so I copied original "only English" form and I'm trying to prepare it to be multilingual. Everything worked fine to some point.
I have dynamic dropdown. I'm not sure if this is the right name for it: user chooses type of tunnel and dependently on his/her choice, he/she sees different colors and lenghs. Lenghs are multilingual by definition, but colors are not. The problem is, colors are not translated... I attached you printscreens.
Any tips?
Comment: I stopped preparing multilingual form when I've met that problem, so problem is visible only in the first line.
Hi Marysia,
That's a new bug. I think I have found a fix though.
Open the file /administrator/components/com_chronoforms5/chronoforms/actions/html/html.php - look for this code around line 641 and add the marked line.
Bob
That's a new bug. I think I have found a fix though.
Open the file /administrator/components/com_chronoforms5/chronoforms/actions/html/html.php - look for this code around line 641 and add the marked line.
if($event_data['action'] == 'set_options'){
$return .= $target_field.'.find("option").remove();';
$options = array();
if(!empty($event_data['options'])){
$lines = explode("\n", $event_data['options']);
foreach($lines as $line){
$opts = explode("=", $line);
$opts[1] = $form->translate($opts[1]); // << add this line
$options[$opts[0]] = $opts[1];
$return .= $target_field.'.append(\'<option value="'.$opts[0].'">'.trim($opts[1]).'</option>\');'."\n";
}
}
}
Bob
GreyHead, you still haven't fixed that, so after every update I have to manually add missing line😟
This topic is locked and no more replies can be posted.