function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Use Visualforce Page in WebtoCase

I have a Visualforce Page with standardController(Case) & Extensions

Can we use this Visualforce Page in WebtoCase?
I would like to have this VisualforcePage in my Company's Website.

Any poniters are welcome.
Many Thanks

If your company website is hosted on sites then you can use visualforce page. Else, webtocase is not more than a html form you can use it anywhere. Visualforce page is platform dependent.
@Reid Thanks for your reply.
I'm not sure if my company website is hosted on sites.
How can do it using sites?

If I have to create using HTML form I need to use lot of styling and other things which I'm not familiar with.
So would like to find a way to integrate the Visualforce Page in my website, which will create the case in salesforce based upon my controller logic

There is no simple way to integrate controller with external application but you can do one thing.

You can write a trigger on Case object. When a new case is entered by web2case from company site, that trigger will fire on before insert and you can perform the controller logic there. You will have access to all fields of that case record.
You can't use your Visualforce page on the standard web to case form, as that submits to a generic Salesforce servlet rather than Visualforce.  What you can to is expose your page via an unauthenticated site and then add this to your company website via an iframe.  We've done this for a number of customers - one example can be found at:

We had to use a Visualforce page for this as the form is collecting information on a variety of issues.
@Bob Thanks for your reply.
I have created a Site and added my Visualforce Pages.
can you please post some sample code on how to add it to via iframe?

Many thanks in advance :)
In your company web site you'll need something like:

<iframe src="<your VF site page>" />

You can find out more about the iframe tag at:
@bob thanks for your reply

What should I put under SRC.

My Site Url is ""
My VF Page name is "webtoCaseManagement"

Now my iframe would be 
<ifrmae src="" />

Please correct me if i'm wrong.

Really Appreciate your help
Correct. As long as you can view that URL through a regular browser, the iframe will be rendered.