PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Populate dropdown dynamically - based on page id or name

  1. Hi - I've searched the documentation and forum and couldn't quickly find a specific answer to the following:

    I have a small form in a sidebar widget of various pages - with a single dropdown - that has values already installed relating to the various page/subjects.

    When someone goes to a particular page, I just need to have the form in the widget select the relevant value from the dropdown values - per the page name/ID or whatever's appropriate.

    This way I use the same form for each of the pages - but it dynamically updates accordingly when displayed - and the notification email will advise the admin recipient of the page (+ context therefore) involved.

    Any help appreciated. Peter.

    Posted 6 years ago on Wednesday March 13, 2013 | Permalink
  2. Do you have an example of this form online, and an explanation of how the post and the drop down are related?

    It might be as simple as using a a merge tag as the default value. You could use {embed_post:post_title} to get the post/page title, or {embed_post:ID} to get the post ID. Merge tags are documented here: http://www.gravityhelp.com/documentation/page/Merge_Tags

    Posted 6 years ago on Thursday March 14, 2013 | Permalink
  3. Merge tags were the answer - so thanks Chris. Regards, Peter.

    Posted 6 years ago on Thursday March 14, 2013 | Permalink
  4. Thanks for the update Peter.

    Posted 6 years ago on Sunday March 17, 2013 | Permalink

This topic has been resolved and has been closed to new replies.