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.

hooks and php inside a html tag field?

  1. rovillesarate
    Member

    Hi! is it possible to insert php codes inside a html standard field? or is there a way for me to insert a php custom script in a form? For example I would like to display a content using a loop statement inside a form? is it possible for me to call this function using a shortcode inside the form using the html standard field. I tried using php inside the html standard field and it obviously not working so is there other way to implement this?

    Posted 12 years ago on Wednesday June 29, 2011 | Permalink
  2. The way to implement this is using the gform_pre_render hook.
    1- Add an HTML field to the form and leave it blank
    2-Use the gform_pre_render hook and place your code to populate the content of the HTML field based on the result of your loop.

    You can find more information on this hook on the following doc page: http://www.gravityhelp.com/documentation/page/Gform_pre_render

    Posted 12 years ago on Wednesday June 29, 2011 | Permalink