This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
review page header
Started 15 years ago by dennisoshields | 4 posts |
-
So how would I put a custom review page header on only certain pages I create?
Like if I wanted people to print out the preview/review page before submitting and hand it to someone else in hard copy to verify their information got submitted?
Posted 15 years ago # -
So you just need to put some extra paragraph on the header of your review page?
MachForm Founder
Posted 15 years ago # -
Yes, but I only want to do it on certain review pages. Not all review pages site wide for obvious reasons. The problem that I can see in editing the view-functions.php file is that it would make it site wide.
Yes, I've already grepped that file out.
I'm looking for something that would allow me to only add it to certain pages I specify.
Posted 15 years ago # -
Actually, yes you are correct with modifying view-functions.php file.
That's the only way to do it.Now, to make it happen for certain review pages, you can simply use some conditional code.
Each of your form is having unique id, so you can use it as a selection rule.
Let say you have a form with id = 7 and would like to add custom text to this form review page only.Search around line 2356 and you'll find this:
$form_markup = <<<EOT
above that line, add this code:
if($form_id == 7){ $custom_text = 'your custom text here'; }
now you can use that $custom_text variable below line 2356, as pointed above.
If you need to have different text for different form, your code should be something like this:
if($form_id == 7){ $custom_text = 'your custom text here'; }elseif($form_id == 8){ $custom_text = 'your second custom text here'; }
Let me know if you have any question.
MachForm Founder
Posted 15 years ago #
Reply
You must log in to post.