0

I'm using a plugin to generate a form and rather than inserting the form on to the page using the content editor I'm adding it directly to my template.

The problem is that on my local version the id for my form is different to the id of the form on my staging site.

Locally I'm including this in my template to show the form:

<?php echo do_shortcode('[ccf_form id="122"]');?>

But on staging my form has an id of 259 instead, so what I was wondering is there a way of searching for a wildcard id? something like:

<?php echo do_shortcode('[ccf_form id="fnmatch(*)"]');?>

or alternately should I find the forms id in phpmyadmin and change it to 122?

I'm using the Custom Contact Forms plugin btw

0

The issue I worked out was that I'd previously built another form on my staging site using CCF, I went through phpmyadmin posts and deleted everything ccf-based then rebuilt my form and since there were no previous forms this form was assigned the id 122 and my template now works :)

It would still be good to know if there's a way to search for wildcards using php as that would be a more scaleable and future proof solution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.