Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

userforms and translatable

Go to End



Community Member, 3 Posts

29 October 2009 at 10:39pm

i had to change the following code in userform.js in order to be able to add fields to a form in a different locale than the default:

var action = $("#Form_EditForm").attr("action") + '/field/Fields/addfield';

to this:

var orgAction = $("#Form_EditForm").attr("action");
var action = '';

if ( orgAction.indexOf( '?' ) != -1 ) {
action = orgAction.replace( '?', '/field/Fields/addfield?' );
else {
action = orgAction + '/field/Fields/addfield';

This makes sure the link for the add field button in the cms is not malformed.