Our current implementation is having different form displayed on the website.
These forms are displayed as HTML widget i.e. AJAX request is send to sales application, which returns HTML fragment. This HTML fragment is nothing but initial screen of the form. But due to latency at sales application we are facing following issues.
Entire page takes 8-10 seconds to load
Html the form is placed in middle section of page so till the time form is loaded footer section is displayed for few seconds and once form is loaded footer section scrolls down, this gives annoying user experience.
- Sometime user click on footer links (till the time html form is loaded) and goes to next page considering there is no content on the page.
Empty div (place holder) is published from CMS side.
Using AJAX call on page load sales application is called
Sales application returns forms as HTML Widget.
Inner text of placeholder is replaced runtime to show the form.
To overcome this issue we are thinking:
Introduce a schema with RTF Field which will contain form html (first screen) .
9 different components will be created using this schema.
Each component will have unique metadata key to identify which form it is.
At content delivery side using metadata key respective component presentation will be retrieved and displayed on page.
Is there any other better way to implement it?
We are using DD4T JAVA in current implementation, we can put form html in views but we need it to be managed through CMS.