Streaming live at 10am (PST)

Custom code limits 5000 character and PHP include usage


#1

I am new and have been searching for an alternative solution to bypass the 5000 character limit. i need to include a form that actually has a little over 7200 without CSS so tried to insert sections of code in several parts as the form is split in 2 columns. But as soon a form tag is inserted, without the end tag, WF will include the end tag and that is when it shuts down this option.

Then, trying to insert code at server level with PHP, and it is being commented. Do not know the reason.
When using the script tag, in explorer it is asking to allow ActiveX to run, which is annoying as the form is being loaded almost on every page.
iframe tag can not be used as the file to be merged is located on Sharepoint Office 365 and does not allow rendering in iframe.

Any options I should check to go forward? Unless someone else suggest something different and easier to implement,
prefer the option of PHP.

Someone can provide me a hint?
Thanks..


HTML Embed - SVG Code Too Long
#2

Why would not create php file, host it on your Dropbox, Googledrive or some other cloud and just call connect that file in the html code? Especially if you using it with the form.


#3

Hi @wllmdjngh, thanks for the good question. First, @sabanna is right, one way to use script longer than 5000 characters is to link it, but it sounds like the case here is different.

Could you help to share the full form code? One option is to minify it before pasting it into the code editor, the embed also counts space as a character.


#4

Thanks for responding promptly and here is the original form created to be inserted. The data generated in this form will be inserted in a CRM system.

https://pocloudcentral.crm.powerobjects.net/powerwebform/powerwebform.aspx?t=WlsQDyoHEeSAvgANOhASK2MAcgBtAA%3D%3D&formId=powf_453DEC86341DE61180D4000D3A116C8C&tver=2013

I edited code with Expression Web to reformat, reduce the size visually to try to fit it in a reasonable space in a popup contact form. This includes editing the CSS style sheet.
Finally Expression Web helps reduce the code size deleting all unused css code and all unnecessary blanks. Have managed to reduce CSS to fit within the 5k limit but code is somewhat more complex.

When inserting the PHP include statement, have tried to do it as the first code on a clean page, at the container level and div block level. It is just being commented out. You can check it on line 130 in the code on this page: http://de-jongh-computing-systems-b98b2a.webflow.io/formas/contact-form

Note that the code to be inserted is only a part of the html body code. Java script has be inserted as the last code in the page settings.

Hope this information provides enough information to help me out.

Thanks


#5

Hi @wllmdjngh, at the moment, our code editor supports javascript, but does not support PHP. To add the PHP code would need to be done after export. PHP also does not run for Webflow hosted sites.

I took a look at the page, and I can see there is a javascript error at line 147 with a javascript undefined error. I will take a look further:

This might be related to trying to using the php code, but I will need to look further. I will respond after I take a look further.


#6

Hi Cyberdave, thanks for taking my request.
Now I have an issue and that is, we are implementing CMS, so we will have to use your servers for our design. Then we have the limit of 5k characters to include code per code insert.
I can not use a code insert without closing tags, webflow will place the closing tag at the end of the inserted code. For example, I would like to be able to open with a tag, other 3

tags with custom code to create my own format of field layout, and then insert custom code just with the closing tag. This would be an lone tag as the first tag was closed by webform.
jquery can not load documents from outside the domain soI can not include code from external site to insert the complete form in the page without creating scripting warnings and it seems werbflow does not provide a location within our working space to store such code so we could use jquery.

Any options you can suggest me?

Regarding the javascript error, this is the link where I stored the code to be inserted: https://dejongh-public.sharepoint.com/SiteAssets/Contactame.html

Thanks


#7

Thanks @wllmdjngh, I am taking a look :wink:


#8