10389 Posts in 2200 Topics by 1712 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 963 Views |
-
userforms and translatable

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.
| 963 Views | ||
|
Page:
1
|
Go to Top |

