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.

Seperating the title from the form name

  1. Jive Software
    Member

    Has any one figured out a way to prevent the form name / title from rendering on the form?

    All our forms have the same headline "Your Info" and I am unable to meet the writers form headline requirment becuase the form title has to be unique becuase it is connected to the form name.

    Posted 11 years ago on Wednesday November 28, 2012 | Permalink
  2. Jive Software
    Member

    It seems like you can do it via the pre render
    In your prerender hook add this code:
    $form['title'] = '';

    or

    $form['title'] = 'Your Title Goes Here';

    Posted 11 years ago on Wednesday November 28, 2012 | Permalink
  3. Jive Software
    Member

    If you want the writter to be able to contribute the form title you can create a custom field on the g form via:

    add_action("gform_properties_settings", "form_properties", 10, 2);
    
    function form_properties($position, $form_id) {
    if($position == 100) {	?>
      <li class="field_form_title_li field_setting">
        <label for="field_form_title">
            <?php _e("Form Title", "gravityforms"); ?>
        </label>
        <input type="text" id="field_form_title" class="fieldwidth-3" onkeyup="SetFormProperty('formTitle', this.value);" size="35"/>
    
    <?php
    }
    }
    
    add_action("gform_editor_js", "editor_script");
    
    function editor_script(){
    
    <script>
    function SetFormProperty(name, value) {
    form[name] = value;
    }
    
    jQuery(document).bind("gform_load_form_settings", function(event, field) {
    
    if(jQuery("label[for='form_title_input']")) {
    jQuery("label[for='form_title_input']").html('Form Name')
    }
    
    if(typeof form.formTitle !== "undefined") {
    if(form.formTitle != "") {
    jQuery("#field_form_title").val(form.formTitle);
    }
    }
    
    });
    
    </script>
    
    }
    
    add_filter("gform_pre_render", "pre_render_function");
    
    function pre_render_function( $form ) {
    
    if(isset($form['title'])) {
    $form['title'] = $form['formTitle'];
    } else {
    $form['title'] = '';
    }	
    
    }
    Posted 11 years ago on Wednesday November 28, 2012 | Permalink
  4. Jive Software
    Member

    Note in the above code the forum security code is editing my code for security reasons... so in the function editor_script() function you need to add php close and open tags before and after the stript tags

    Posted 11 years ago on Wednesday November 28, 2012 | Permalink
  5. You can choose not to display the form title when you embed the form. Uncheck the box which says "Display form title". Screenshot: http://minus.com/lbh1LtfAtRwdYS

    Did I miss your issue completely or will this approach work for you?

    Posted 11 years ago on Thursday November 29, 2012 | Permalink
  6. You can choose not to display the form title when you embed the form. Uncheck the box which says "Display form title". Screenshot: http://minus.com/lbh1LtfAtRwdYS

    Did I misunderstand your issue completely or will this approach work for you?

    Posted 11 years ago on Thursday November 29, 2012 | Permalink