This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#fb_xml').formBuilder(); | |
$('.fb-save').click(function() { | |
//try to infer field name from label; otherwise FormBuilder gives it names like text-1231231231 | |
$("ul#frmb-0 li").each(function(i) { | |
var label = $(this).find('.form-elements .label-wrap input').val(); | |
var name_field = $(this).find('.form-elements .name-wrap input'); | |
var slug = label.toLowerCase().replace(/[^\w ]+/g,'').replace(/ +/g,'-'); |