Hi,
i've made a form with chronoforms but now i want to add another field in the table with a default param, how i can do it?
ok i solved the problem by adding the field in the table with phpmyadmin. But if i need to display the field in the front end with differents color what i must do? i want to display the data with red color if the field is 1 and with green color if the field is 2🙄
Hi vecchia,
how do you show the field in frontend ? show me code
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Hi vecchia,
I think you can do it this way:
<?php
if($MyForm->status_mappa == 1){
$color = '#ff0000';
}
if($MyForm->status_mappa == 2){
$color = '#000000';
}
?>
<tr style="font-weight: bold;">
<td>{nome_mappa}</td>
<td>{recordtime}</td>
<td style="color:<?php echo $color; ?>">{status_mappa}</td>
</tr>
Cheers
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
ok and how i can add a compatible field in the chronoforms's table?
mmm, it doesn't works😢 with phpmyadmin i created a new field INT(11) and i put in it the number 1. After that i tried your code but it doesn't write the color in the style😲
does it load the same record data into other fields ?
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Oh sorry, a typo, please use my code exactly but replace $MyForm by $MyRow
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
oh yea! now it works very well😀