Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author kandrews

    (@kandrews)

    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!

    Thread Starter rana_cronic

    (@rana_cronic)

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

    Regards ??

    Plugin Author kandrews

    (@kandrews)

    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!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Resumé Submissions & Job Postings] Admin input field feature’ is closed to new replies.