• Resolved hurlad

    (@hurlad)


    Help needed!

    I’m trying to create a gravity wp count function that uses a date from gravityforms merged tags.

    So far I have this which works –

    [gravitywp_count formid=”1″ thousands_sep=”,” created_by=”current”
    start_date = 08/10/2022]

    But I’d like it to start from the date a different form was submitted e.g when they submit a form to purchase a plan. I thought I could add the merged tag for date of submission {date_dmy} however this does not work.

    [gravitywp_count formid=”1″ thousands_sep=”,” created_by=”current”
    start_date = {date_dmy}]

    Is there a way to do this??

    If it is possible I’d also want the count to reset every month (30days) after the initial date.

    Could anyone help with this?

    Thank you in advance!!

    • This topic was modified 2 years, 3 months ago by hurlad.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author GravityWP

    (@gravitywp)

    Hi Hurlad,

    The start_date should be formatted in MM/DD/YYYY format, so I think you should use {date_mdy}. See: https://docs.gravityforms.com/category/user-guides/merge-tags-getting-started/

    Also, you need to be sure the merge tag is available within the context were you are using the gravitywp_count shortcode.

    Another possibility is to use the relative date format, like ‘-24 hours’ or ‘today’. See:
    https://gravitywp.com/doc/relative-date-filter/

    Thread Starter hurlad

    (@hurlad)

    Thank you for your reply,

    so far I have this, but I am not sure if it is correct, could you please review it and tell me how to alter it if it is incorrect?

    [gravitywp_count formid="1" 
    
    thousands_sep="," created_by="current"
    
    start_date = formid="2" date_mdy  
    
    end_date="-1 months"]

    It should start counting how many entries are made per user for form 1
    and start counting after form 2 is submitted and count for the month.

    so it will display the entries of form 1 per month beginning from the submission date of form 2

    will this reset every month using ‘end_date=”-1 months” or is there a different way to have it repeat/reset every month/30 days?

    Thanks for the help!

    Adam

    Plugin Author GravityWP

    (@gravitywp)

    Hi Adam, the shortcode won’t work this way as the syntax is not right. I don’t see a way to combine the information in two forms within the count shortcode. This will require a custom coded shortcode. If you want that you can hire us via
    aiwos.com or find your own programmer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Help needed with gravityWP count’ is closed to new replies.