form avec plusieurs action - Joomla! Forum - community, help and support


bonjour à tous,

j'ai créé un composant (mvc) qui permet d'effectuer des recherches avec plusieurs views.
chaque view represente une section (musicien, concerts...)
jusqu'à la pas de problème.

j'ai crée ensuite un module en front où l'utilisateur choisi section (donc sa view).
donc je n'ai pas besoin de transmettre une variable du module au composant.

comment bien renseigner le jroute selon le choix du form?
merci


code: select all

<?php
defined('_jexec') or die('restricted access');
?>

<form action="<?php echo jroute::_( 'typerech.value');?>" method="post" name="formtyperech" target="_self">
        <table>
            <tr>
            <td><label>recherche:</label></td>
            <td>   
            <select name="typerech">
                <option value="all">divers</option>
                <option value="index.php?option=com_monform&view=musicien&layout=form">musicien</option>
                <option value="index.php?option=com_monform&view=evenement&layout=form">&eacute;v&egrave;nement</option>
            </select>
            </td>
            <td><input type="submit" value="->"></td>
            </tr>
        </table>
</form>

tu ne peux pas faire ça en utilisant typerech.value
il faut une fonction dans ton controller qui optiens la valeur de typerech avec un jrequest et qui redirige vers la bonne vue.





Comments

Popular posts from this blog

Joomla site hacked, cant see front and - Joomla! Forum - community, help and support

Christian Home School Programs - Joomla! Forum - community, help and support

Trouble with PF_OutFlag_I_USE_AUDIO and PF_CHECKOUT_LAYER_AUDIO