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
Can you add Hyperlink(s) to a form's Logo?
Started 15 years ago by tania | 10 posts |
-
Hi,
I need to add some hyperlinks to a logo on a form. I see the CSS File where to change the logo. Is there a way to add a hyperlink?
If this cannot be done in the CSS file, what is a good workaround? I could add a section break at the beginning of the form and write the HTML code there for the logo, but I would like the form's title to come after the logo.
Thank you in advance for your help!
Posted 15 years ago # -
Hi,
To change your form logo as hyperlink, you need to edit "includes/view-functions.php" file, go to line 1838, you will see this code :
<h1><a>{$form->name}</a></h1>
For example your hyperlink url is "http://www.mydomain.com" then change to
<h1><a href="http://www.mydomain.com">{$form->name}</a></h1>
otherwise you can add hyperlink tag in "form title" text box when you edit the form. I think it's more easier :)
MachForm Support
Posted 15 years ago # -
Thanks. I am putting more than 1 hyperlink on to one logo so it is too long to put in the "form title". I actually did not want to make this a global change, but specific to each form. How would I do that?
Posted 15 years ago # -
It's need to use a different approach then, you can ignore my previous code. To do so edit "view-functions.php" and go around line 1814 ~ 1816, you will see these code :
if($embed){ $embed_class = 'class="embed"'; }
put these code exactly bellow that line
if ($form_id == 1) { $form_link = '<a href="http://www.domain1.com">'.$form->name.'</a>'; } elseif ($form_id == 2) { $form_link = '<a href="http://www.domain2.com">'.$form->name.'</a>'; } else { $form_link = '<a>'.$form->name.'</a>'; }
Then go to line 1846, you'll see this code :
<h1><a>{$form->name}</a></h1>
replace with
<h1>{$form_link}</h1>
Don't forget to change the form id with yours
MachForm Support
Posted 15 years ago # -
Redityo - thank you! We are soooo close here. I am trying to do several hyperlinks on one logo. I was using the following code in a section break to add the different hyperlinks:
<img src=http://www.example.com/LOGO/my_Logo.gif usemap="#logo" border="0">
<map name="logo"></map>
Can something like this be added?? If not, can you hide the Form Title in the form? A quick response would be great as I am trying to get this out today! :)
Thanks so much!
Posted 15 years ago # -
I just realized I posted this publically in a forum, are you able to delete the previous post and reply privately?
Posted 15 years ago # -
redityo I changed the line <h1>{$form->name}</h1> for <h1>{$form->name}</h1> in view-functions.php file on the includes folder but nothing happens...
Posted 13 years ago # -
I think you forget to add the link tag. Try to change your code again and make sure you've change it like this :
<h1><a href="http://www.mydomain.com">{$form->name}</a></h1>
MachForm Support
Posted 13 years ago # -
Duuuuuuhhh, copy/paste error, its working fine now... I could swear yesterday I pointed to the site, too much hours at the job I guess.
TKS
;)Posted 13 years ago # -
I'm trying to get this working on the latest version (3.2), but it isn't working. Have the necessary code changes and additions changed as of version 3?
Posted 12 years ago #
Reply
You must log in to post.