Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Paste & execute this in your browser's js console when you're on a Zoho Creator form's scriptbuilder page.
* ZC fields render
* When on a Zoho Creator form scriptbuilder page, paste this into your javascript console
* (if on FF I recommend firebug) & execute it. This will render a DS code for all of the form fields
* DOUBLE CLICK the textarea created to remove it
* @param string m -Change to "insert","collect", or "update" to change the DS code output
* @param string r -Change to whatever you want your record collection variable to be
* @author Stephen Rhyne @srhyne
* @license whatever!
var fields = [],m = "insert",r = "r",v,
methods = {
insert : function(v){
return v+" = input."+v+"\n";
collect : function(v){
return "input."+v+" = "+r+"."+v+";\n";
update : function(v){
return r+"."+v+"= input."+v+";\n";
$("table.referfields-item-table tr")
v = $(this).find("td input")[0].value;
fields.push(methods[m || "insert"](v));
$("<textarea />")
"right" :"0px",
"width" : "500px",
"height" : "500px",
"overflow" :"auto",
"border" : "2px solid rgb(220,220,220)"

Was really excited when I saw this, but then it turns out 6-years old code won't work on the newest version of ZohoCreator... d'oh!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment