Ergebnis 1 bis 3 von 3

Thema: Link between MM and a form ?

  1. #1
    Contao-Nutzer
    Registriert seit
    07.11.2012.
    Beiträge
    106

    Frage Link between MM and a form ?

    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.

  2. #2
    Contao-Fan
    Registriert seit
    16.05.2014.
    Beiträge
    295

    Standard

    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.

  3. #3
    Contao-Urgestein Avatar von zonky
    Registriert seit
    19.03.2010.
    Ort
    Berlin, Rdf
    Beiträge
    9.714
    User beschenken
    Wunschliste

    Standard

    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.

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •