WordPress.org

Ready to get started?Download WordPress

Forums

WP-CRM - Customer Relations Management for WordPress
For those of you who want placeholders. (1 post)

  1. futurecar
    Member
    Posted 11 months ago #

    So I finally figured out how to do this. I also suggest styling the form with CSS but that's a whole different post. I suggest that you store a copy of these files somewhere so that if there's an update you can easily overwrite the files with your modified version. In any case always backup.

    Find this file in the core>premium folder:
    class_contact_messages.php

    Find this line and either comment it out or delete it. I chose to comment it out.
    <label class="control-label wp_crm_input_label"><?php echo $this_attribute['title']; ?></label>

    This will get rid of the label (for example, display name) right above each input field.

    Close this file and upload via FTP.

    Find this file in the core folder:
    class_functions.php

    On line 4703 (at the time of this writing) you will see a block of code that looks like this:

    <input <?php echo $tabindex; ?> wp_crm_slug="<?php echo esc_attr($slug); ?>" random_hash="<?php echo $rand; ?>" name="wp_crm[user_data][<?php echo $slug; ?>][<?php echo $rand; ?>][value]" class="input-large wp_crm_<?php echo $slug; ?>_field <?php echo $class; ?>" type="<?php echo $input_type; ?>" value="<?php echo ($slug!='user_pass') ? esc_attr($value_data['value']) : ''; ?>" />

    Add this within the input tag:
    placeholder="<?php echo $attribute['title']; ?>"

    This also needs to apply to the textarea input so you need to find this line:

    <textarea wp_crm_slug="<?php echo esc_attr($slug); ?>" <?php echo $tabindex; ?> random_hash="<?php echo $rand; ?>" name="wp_crm[user_data][<?php echo $slug; ?>][<?php echo $rand; ?>][value]" class="input-large wp_crm_<?php echo $slug; ?>_field <?php echo $class; ?>"><?php echo $value_data['value']; ?></textarea>

    Add the same line to the textarea code:
    placeholder="<?php echo $attribute['title']; ?>"

    So in doing this, when you go into the settings for WP-CRM then the Data tab, enter the title (this will serve as the placeholder) for your new field or existing ones and that's it!

    This is what my form looked like.

    http://wordpress.org/plugins/wp-crm/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.