• Resolved harrylynn17

    (@harrylynn17)


    Hello,

    Thank you very much for creating this wonderful plugin and making it available for us to use. This is just so wonderful. I would like to ask a question. I have a contact form using contact form 7. The idea behind the form is, users can submit support ticket to different department but there is a limit on how many submission a particular department can handle. In the form, users can select different department using a dropdownlist, i.e. Tech Support, Customer Support, Payment Support etc.

    When the amount of submission for Tech Support hit 50, then prevent users from submitting another contact form. There is only one form but users can select different department from dropdownlist. So, I think I might need to take that value out from dropdownlist instead of preventing the submission of form, because even though Tech Support hit 50, Customer Support might still be at 22 and Payment Support might be 48.

    How can I accomplish something like that using this plugin ? I found a similar example here https://cfdbplugin.com/?page_id=904 but can’t relate to my scenario. Any input is much appreciated. Thank you.

    https://www.ads-software.com/plugins/contact-form-7-to-database-extension/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    This may be more relevant: https://cfdbplugin.com/?page_id=1435
    It shows how to make a custom drop down in CF7 from CFDB data.

    In your case, you query and count the department names then decide which ones to put in your drop-down.

    Thread Starter harrylynn17

    (@harrylynn17)

    Thank you. I don’t know how to manage it but thank you so much for shedding light on me. So I may need to do the following steps in order to accomplish what I am doing

    Step 1 – Query the total number of record for each department
    Step 2 – If a particular record still doesn’t hit the limit number, then bind it to the drop down list.

    Just wondering but I am not sure if I am right or not. I am thinking of a scenario like let’s say 20 people request the contact form to submit Tech Support but they take like 10 mins to submit those forms. Tech Support limit is 50 and at that time, already 46 forms have been submitted. While at the same time, 4 people submit within 2 minutes and hit the limit 50 but there are already 20 people out there who think they are able to submit request to Tech Support department and forms are on their browser because the value of department is bind to the drop down list at 46 count. I am not sure if I am making the matter complicated or it is something that I should be worried about ?

    Sorry If I sound stupid as I am not really a programmer. I really do not know how you manage to make this wonderful plugin available for free at the same time attending support promptly. You are a genius. Thank you for helping me out. I hope to hear your input and thoughts on the matter too.

    Plugin Author Michael Simpson

    (@msimpson)

    In the case where a user was allowed a certain option when he loaded the form, but is no longer allowed when he submits: you could use the Prevent Duplicate Submissions to check again if the department selection is OK on submit. If not, indicate an error telling the user to pick a different one.

    Thread Starter harrylynn17

    (@harrylynn17)

    Thanks a lot Michael. Last question. Do you think it would be possible to use one of these filter wpcf7_before_send_mail or wpcf7_posted_data ? Like when users click the submit button, then call some php function to query the total row in the database and if the number has reached the limit, then do not accept the data at all ?

    Thanks a lot for helping me out.

    Plugin Author Michael Simpson

    (@msimpson)

    I recommend the ones I cite in the links I already provided.

    Thread Starter harrylynn17

    (@harrylynn17)

    Thank you very much Michael.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Limit total number of submission based on a drop down field’ is closed to new replies.