WordPress.org

Ready to get started?Download WordPress

Forums

Resume Submissions & Job Postings
[Plugin: Resumé Submissions & Job Postings] Admin input field feature (4 posts)

  1. rana_cronic
    Member
    Posted 2 years ago #

    Great plug in indeed !!

    I want to add more input field to the form. the feature is not available at this moment in your plugin. By when the feature will be included or is there any way i can do it manually because i am in a hurry to publish the website
    Looking forward for your reply...thankz in advance ! :)

    http://wordpress.org/extend/plugins/resume-submissions-job-postings/

  2. kandrews
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    I've been busy with other work, so I haven't been able to get to that feature yet.

    But if you know php and how to modify database tables, then adding new fields should be easy to do manually.

    If you do, then I can give some guidance.

    And thanks for using the plugin!

  3. rana_cronic
    Member
    Posted 2 years ago #

    thank you for your quick reply ..
    i know some basic php/mysgl, it would be very helpful if you guide me so .

    Regards :)

  4. kandrews
    Member
    Plugin Author

    Posted 2 years ago #

    For the database side, just find the table "rsjp_submissions" and add the new columns to it.

    Depending on what kind of fields you need, really everywhere there are those fields, you could just copy one like first name or address.

    For instance:
    Near line 15 in the includes/form.php page find:
    $fname = $_POST['fname'];

    Below these add:
    $yourNewFieldName = $_POST['yourNewFieldName'];

    Depending on if you are going to require the field(s):
    At line 85 add your requirements before this line:
    if( $action == 'add' && $formError == false ) {
    The statement could look like this:

    if( $yourNewFieldName == ''){
        $formError = true;
    }

    For inserting the field to the database, find on line 88:
    $insertQuery = $wpdb->query('INSERT INTO '[...]
    and add your new field(s) in the correct position as your new column in your database.

    Near line 159 you see:
    $errorFName = $fname;
    Add after:
    $errorYourNewFieldName = $yourNewField Name;

    then at 175 below:
    $errorFName = "";
    Add:
    $errorYourNewFieldName = "";

    At 239 find where it displays the input field:

    <tr>
                    <td><p><?php _e( 'First Name' ); ?>: </p></td>
                    <td><input type='text' name='fname' size='20' value='<?php if ( $errorFName == '' ) echo $current_user->user_firstname; else echo $errorFName; ?>' /></td>
                    <td valign="top"><p><?php echo displayRequired( grabContents( get_option( 'resume_input_fields' ), 'fname', 1 ) ); ?></p></td>
                </tr>

    Insert your field where ever you need it like this:

    <tr>
                    <td><p><?php _e( 'Your New Field' ); ?>: </p></td>
                    <td><input type='text' name='yourNewFieldName' size='20' value='<?php echo $errorYourNewFieldName; ?>' /></td>
                    <td valign="top"><p>*(if required)</p></td>
                </tr>

    You would basically need to do the same in the includes/submissions.php page, which is find the variable $fname and copy what it does.
    Only thing to watch for is if it is an array, which you shouldn't have to add the new field into.

    Hope this helps!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic