Hello,
I'm creating a MM to display a list of jobs offers. Under the list, i'll put a form for people to candidate. I would like a button in my MM element to copy the job offer number into the right form field.
Thanks for your help.
Hello,
I'm creating a MM to display a list of jobs offers. Under the list, i'll put a form for people to candidate. I would like a button in my MM element to copy the job offer number into the right form field.
Thanks for your help.
Hello!
I would say this doesn't necessarily have something to do with MM directly.
If you would have only 1 job (detailed view) you could prefill it with the number.
When you display (possibly) multiple jobs and the form on the same page you will have two possibilities.
1. The button submits a form to the current page with the number as parameter, then you can set this number in the application form from the received form data (POST/GET).
This would only require to edit the template of the MM, where you create you submit button with the number, which you have as a variable (and of course the form to use this data).
Well, you might want to consider just using a new page with only the application form in this case and use the button to go there.
2. Or you can (additionally/instead) use Javascript to avoid a reload. With Javascript you can read the job number e.g. from the button, that is created in a similar way as the submit button of the first possibility. Then you can use Javascript to jump to the form and write the number into the correct form field.
So you can create that "link" by adjusting the MM template to your needs.
If it is a list of jobs and the ID is to be transferred to a form on the page by clicking on it, I would do this using javascript.
In the form, create a hidden field (id) which is populated by Javascript via a click event for the item.
MetaModels-Workshop: ... wo sich die nächste Gelegenheit bietet... oder Extern oder Online
Erweiterungen: Infos im Seitenbaum, Formular-Default für Select/Checkbox/Radio (SCR), Formular-Newsletteranmeldung, Regex-Formularwidget, Lizenzmanager für Isotope
Unterstützung per Github-Sponsoring: MetaModels Handbuch und Forum, e-spin Erweiterungen
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
Lesezeichen