WordCamp Europe 2023 Special Offer - Get 30% OFF any edition with coupon: WC30

My Account

Forums

Home Forums General Shortcode: Can I add prefill-data?

Viewing 2 reply threads
  • Author
    Posts
    • #32713
      cubetech
      Participant

      Hi there

      Is there a way to add some prefill-data to the shortcode?
      For example if I’m on a page with a form where the form has a field “subject”.
      The prefill-value of this subject field should be something based on the page I’m on (not normal fields like title).

    • #32738
      Mark Westguard
      Keymaster

      Hi

      That is not possible via the shortcode, but there are various ways of pre-populating a form with data.

      With Post data (including any meta key or ACF field)

      Populate a Form with Post Data

      With query string data

      Populate a Field with Query String Data

      With a hook (Example)

      Dynamically Populate Select, Checkbox and Radio Fields

      Thanks!

      Mark

    • #32796
      cubetech
      Participant

      Thank you Mark 🙂

      I hoped that there is something like a data-paremeter which I can easy add to the shortcode.
      But yeah, ofc dynamic populate is also an option. The only “bad” thing is, that if I want to populate a form on page A but not on page B it will get a bit messy I think 🙂

      Christian

Viewing 2 reply threads
  • You must be logged in to reply to this topic.

Login