inspiredminds / contao-fieldset-duplication

Contao extension to allow the duplication of form fieldsets in the front end by the user for additional input fields.
GNU Lesser General Public License v3.0
13 stars 6 forks source link

Error with javascript template #4

Closed johannes-bittner closed 4 years ago

johannes-bittner commented 4 years ago

Very nice and useful extension!

When using the original javascript template ( j_fieldset_duplication.html5), the buttons are not shown and the console log says:

Uncaught SyntaxError: Unexpected identifier

Uncommenting the lines 8/10 [buttonAdd: '+' / buttonRemove: '×'] solves the problem.

fritzmg commented 4 years ago

Hm, I cannot confirm that. Which browser in which version?

johannes-bittner commented 4 years ago

Template: grafik Console Chrome 84/85, Windows 10:

grafik

I had to create the template in the backend and to uncomment the two lines in order to have the icons displayed.

fritzmg commented 4 years ago

Ah, you copy & pasted the custom options of the README, which have this error. The default template looks like this: https://github.com/inspiredminds/contao-fieldset-duplication/blob/master/src/Resources/contao/templates/j_fieldset_duplication.html5

The error in the README is fixed now.