Closed (fixed)
Project:
Form Builder
Version:
7.x-1.x-dev
Component:
Form Builder Core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jun 2014 at 09:44 UTC
Updated:
15 Nov 2014 at 15:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
torotil commentedHere is a workaround that makes the addElement replace the placeholder successfully.
Comment #2
torotil commentedAfter a few more days of debugging I've come up with a more comprehensive solution. This one get's the element name right in the first place. I've also put the code to generate element names (previously only in dropElement) in newFieldName so that it can be used more generically.
This also fixes issues with adding an element by clicking on it in the palette when the form is empty.
Comment #3
torotil commentedComment #4
katzmo commentedThanks for the patch!
I just noticed one little detail that throws a js-error in most browser and makes the form builder unusable:
Default values for parameters in js aren't standard yet and are at the moment only supported by Firefox (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/defaul...).
I'd propose to change the line to
since the if-condition in the following line checks for $element anyway.
Comment #6
torotil commentedI've just pushed the patch to 7.x-1.x.