I am trying to use the gform_pre_render hook to alter the limitEntriesMessage to show some custom text along with another form.
Currently I am using this:
add_filter('gform_pre_render', 'bbc_closed_text');
function bbc_closed_text($form) {
// subtract the entry count from the limit to determine how many are left
$form['limitEntriesMessage'] = '<div class="closed gform_heading active"><img class="eighty-sixed" src="'.get_bloginfo('stylesheet_directory').'/images/eighty-sixed.png" />'.$form["description"].' <span class="remainder">* 0 Seats left</span><p>Aw, Shucks. Looks like you missed out this time. Check back soon so you can be a part of the next TBC meet up!</p></div><div class="subscribe-form"></div>';
// return the form
return $form;
}
What I would like to do is also show a sign up form for newsletters within that custom content in the "subscribe-form" div. I have tried this but no luck it just seems to break the site:
add_filter('gform_pre_render', 'bbc_closed_text');
function bbc_closed_text($form) {
// subtract the entry count from the limit to determine how many are left
$form['limitEntriesMessage'] = '<div class="closed gform_heading active"><img class="eighty-sixed" src="'.get_bloginfo('stylesheet_directory').'/images/eighty-sixed.png" />'.$form["description"].' <span class="remainder">* 0 Seats left</span><p>Aw, Shucks. Looks like you missed out this time. Check back soon so you can be a part of the next TBC meet up!</p></div><div class="subscribe-form">'.gravity_form(1, false, false, false, '', true).'</div>';
// return the form
return $form;
}