Hi @thortor,
I’m afraid, I’m not sure whether I understood your query. Just to be sure, you are facing with “Limit” set in Select fields not working, right?
If yes, I gave a quick test and was able to notice it’s working on your mentioned page. The option with “limit 1” set is no longer showing up in your form once tested:
Could you please advise if I’m missing out on anything from the above test? Also please share the URL of the ticket where you tested the given code, so that it would be easy for us to have a better idea?
Looking forward to your response.
Kind Regards,
Nithin
Yes right sorry. This is url of previous ticket
https://wordpress.org/support/topic/show-remaining-number-of-submissions/#post-14899484
It was about showing info how many submissions is left of the chosen option under select field
$html .= "<p>" . $option['label']. " submission limit: " . $option['limit'];
$html .= " Still another {$remaining} to go, so hurry up!";
Hi @thortor
I hope you’re well today!
I checked the original code and it seems that due to some changes in Forminator plugin (since original code was shared) it needed some slight adjustments.
I’m sharing updated (for current version of Forminator) code here:
https://gist.github.com/adczk/06f24899b1512e24f4757d7296591bdf
Please replace the code that you tested with this one and to configure it:
– set form ID(s) in this line
$list_form_ids = array(1177); // set form ID(s) here
– set select field ID(s) in this line; note the format, please, it no longer needs “-field” part
$select_ids = array( 'select-1' ); // set select field(s) IDs here
– and, finally, you can adjust your message here
// adjust message text in two lines below
$html .= "<p>" . $option['label']. " submission limit: " . $option['limit'];
$html .= " Still another {$remaining} to go, so hurry up!";
I’ve tested it and I can confirm it’s a working code.
Best regards,
Adam
Thanks for help and fast reply. Great support. I also confirm that code works wonderfully.
Best regards
-
This reply was modified 2 years, 6 months ago by thortor.