Show Number of Entries + Base Number In Front End [RESOLVED]

I am migrating a website where the form used was formidable and the client had say 50,000 submissions.

I am changing the form to Gravity Forms and need to show the number of entries on the front end of the website for that form. I have this part working and the submitted forms are showing as expected BUT…

how can I allocate that 50,000 submissions from the other website? Is there a function of some type where I can have this specific form start at 50,000 and then have the function I already have just goes from there to 50,0001 etc?

Hope this makes sense! Any help is greatly appreciated!

Hi @jcaren,

Is your question about showing the number of entries in a form + 50.000?
What solution are you using now to show the number of entries on the front end?

Hi Erik,

Right now I just have the number of forms currently in the admin showing using a function as shown below. I would like to have a value added to that to reflect the forms that had been entered on the old site to show the full total…was hoping I could just adjust the “start” number somehow of the gravity form submissions - unless there is another way…

add_filter( 'gform_shortcode_counter', 'wpbrainery_counter_shortcode', 10, 2 );
function wpbrainery_counter_shortcode( $output, $atts ) {
 
    extract( shortcode_atts( array(
        'id' => false,
        'status' => 'total',
		'start' => '200',
        'format' => false
    ), $atts ) );
 
    $valid_statuses = array( 'total', 'unread', 'starred', 'trash', 'spam' );
 
    if( ! $id || ! in_array( $status, $valid_statuses ) ) {
        return current_user_can( 'update_core' ) ? __( 'Invalid form ID or form status parameter.' ) : '';
    }
 
    $counts = GFFormsModel::get_form_counts( $id );
    $output = rgar( $counts, $status, $start);
 
    if( $format ) {
        $format = $format == 'comma' ? '.' : ',';
        $output = number_format( $output, 0, false, $format );
    }
 
    return '<div class="gcounter"><h2>Take the <strong>#berecycled</strong> pledge</h2> <h3>' .$output. '</h3>' . ' <h4>people have signed this pledge.</h4>
<h5>Be the 83,472nd!</h5>.</div>';
}

Hi @jcaren,

We’ve made for a client a shortcode plugin for counting entries (and counting the total of a specific number field for multiple entries) and shared it on the WP repository. Since than we received a lot of feature questions. One of the users also wanted to add a number to the total.

We’ve added that in version 0.7:
Added attribute add_number=”” to the shortcode. With this attribute, you can add or subtract a number from the output. For example add_number=”100″ will add 100 to the output. For example add_number=”-100″ will subtract 100 from the output.

It’s still a beta version, but maybe this solution can help you with your code. Check the shortcode PHP here:
https://plugins.trac.wordpress.org/browser/gravitywp-count/trunk/gravitywp-count.php

1 Like

It sounds like you want to start the Gravity Forms entry numbering at 50001, is that correct?

Or are you trying to count the number of Gravity Forms entries and add that to your previous number, and then show that updated number of submissions on the website?

1 Like

That is what I was hoping I could do – just start the forms at a different number - currently there are no entries since we just migrated…so if I can start the number at 50,000 (the submissions from the old site with a different form) - and have that number show on the front end – then every new submission will increate that number.

This looks cool Erik and might work…will take a look, thank you!

This worked perfectly! Thank you so much Erik!

Hi Erik. Do you need help with anything at this point, or are you all set?

Excellent @jcaren, happy I could help.

@chrishajer: I didn’t need help :wink:

Sorry Erik, wrong person. Meant that for the OP.

1 Like