App Within Minutes creates a nice "Add record" button. After clicking the button a dialog is presented asking for input that is used to create a new documentname. This is (more or less, since i modified it slightly) the Java script that is added to the sheet by the app-within-minutes generator. My question is due to fact that i'm not a javascript expert, so solution might be very simple: I would like to generate the documentname based on user that is clicking the button If user in group X then input will be pre populated with 'Full Name" of that user and popup will not allow user to change this value; Confirmation would be like "New Question will be made for: [[Gerritjan Koekkoek]] and user can only proceed or cancel If user in group y the same behaviour; but now the inputbox would need to be open for change Confirmation would be like "New Question will be made for: [[Gerritjan Koekkoek]] but now user can change the input to 'Andree Benz' meaning that new question is posted by Gerritjan Koekkoek on behalf of Andree Benz. How would you suggest to change below script to get the desired effect? (see lineindicator ==> of what I thought would be a solution? var XWiki = (function (XWiki) { XWiki.EntryNamePopup = Class.create(XWiki.widgets.ModalPopup, { initialize : function($super, trigger) { trigger.observe('click', this.showDialog.bindAsEventListener(this)); this.urlTemplate = trigger.up().next('input[type=hidden]').value; this.input = new Element('input', {type: 'text'}); this.addButton = new Element('input', {type: 'image', src: '$xwiki.getSkinFile('icons/silk/add.png')', alt: '$escapetool.javascript($msg.get('cdlsateprivat.CreateNewQuestionAltText'))'}); var container = new Element('div', {id: 'entryNamePopup'}); container.insert(this.input); container.insert(this.addButton); $super(container, { show: {method: this.showDialog, keys: []}, add: {method: this._onAdd, keys: ['Enter']} }, { title: '$escapetool.javascript($msg.get('cdlsateprivat.CreateNewQuestionTitle'))', verticalPosition: 'top' }); }, createDialog : function($super, event) { this.input.observe this.addButton.observe('click', this._onAdd.bind(this)); $super(event); }, showDialog : function($super, event) { $super(event); ==> $this.input.val() == 'Gerritjan Koekkoek' //this line did not work, how can I get it prepopulated (or suggested) with preferably XWiki variable this.input.clear().focus(); }, _onAdd : function() { if (this.input.value != '') { window.self.location = this.urlTemplate.replace('__entryName__', encodeURIComponent(this.input.value)); } else { this.input.focus(); } } }); function init() { var actionBox = $('actionBox'); if(actionBox) { new XWiki.EntryNamePopup(actionBox.down('.add')); return true; } return false; } (XWiki.domIsLoaded && init()) || document.observe('xwiki:dom:loaded', init); return XWiki; }(XWiki || {}));