link with database

bzzz 07 Sep, 2010
good morning everybody
excuse me but i'll expose my pb in french first because it's easier for me and second because i know that Mr greyhead understands and speaks french.
so j'ai crée un formulaire d'enregistrement avec chronoforms qui contient des textbox et des dropdown et une table pour le sauvegarder, ensuite j'ai crée un autre formulaire mais cette fois ci de recherche qui contient seulement des dropdown pour effectuer une recherche dans la table et afficher le résultat.
1)je voudrais pouvoir restreindre les choix d'une dropdown selon le choix effectué dans la dropdown qui la précède(pays et villes).
2)une fois les choix faits je valide avec un submit,comment faire le lien avec la bdd?ou dois je mettre le code qui correspond à la requête pour avoir le résultat?(pour la requête je me crois que je me débrouillerai)
3)si j'ai bien compris j'aurais besoin de chronoconnectivity comment le lier avec chronoforms
désolé si je vous importune mais je suis bloqué et depuis une semaine je ne fais que ronger mes doigts
merci pour votre aide

From Google translate

so I created a registration form with chronoforms which contains textbox and dropdown and a table to save it, then I created another form but this time search that contains only the dropdown to search in the table and display the result.

1) I wish I could restrict the choice of a dropdown at the option in the dropdown that precedes (countries and cities).

2) once the choices I submit a valid, how to link to the db? Or do I put the code that corresponds to the request for the result is (for the request I think I'll manage)

3) I understand I need to link with how chronoconnectivity chronoforms

sorry if I trouble you but I'm stuck for a week and I'm just biting my fingers
thank you for your help

GreyHead 07 Sep, 2010
Hi bzzz,

I added a Google translation to your post (and will add one here too). My writing in French isn't so good :-(

For 1) the easiest solution is to use option groups in the second drop-down and use a JavaScript to hide or display them based on the value of the first drop-down. This is a recipe in Chapter 7 of the ChronoForms Book. You can also do it with Ajax but this is much more complicated.

But 2) makes me wonder if this liting isn't something better done in ChronoConnectivity which is designed to show listings of records. If you do it in ChronoForms then you can get the values submitted from the $_POST array. Search here on JRequest for many examples.

For 3) ChronoForms is a Forms creator and manager. ChronoConnectivity creates and manages listings of records stored in a database table. So you create and edit the data with ChronoForms, you display it with ChronoConnectivity.

J'ai ajouté une traduction de Google à votre poste (et on ajouter ici aussi). Mon écriture en français n'est pas si bon :-(

Pour 1) la solution la plus simple est d'utiliser les groupes d'options dans la deuxième liste déroulante et d'utiliser un JavaScript pour afficher ou masquer les fondée sur la valeur de la première liste déroulante. C'est une recette au chapitre 7 de l'ChronoForms Livre (en anglais). Vous pouvez aussi le faire avec l'Ajax, mais c'est beaucoup plus compliqué.

Mais 2) Je me demande si ce n'est pas Liting quelque chose de mieux faire dans ChronoConnectivity qui est conçu pour montrer listes de documents. Si vous le faites dans ChronoForms alors vous pouvez obtenir les valeurs introduites à partir du tableau $ _POST. Rechercher ici sur JRequest de nombreux exemples.

Pour 3) ChronoForms est un créateur et gestionnaire de formulaires. ChronoConnectivity crée et gère des listes de documents stockés dans une table de base de données. Ainsi, vous créer et modifier des données avec ChronoForms, vous l'afficher avec ChronoConnectivity.



Bob
bzzz 07 Sep, 2010
thank you greyhead you made things clearer for me i'll try to see what i can do and let you informed
This topic is locked and no more replies can be posted.