# Customizing the dialog box (Removing input field but keeping text)

**URL:** <https://discourse.psychopy.org/t/customizing-the-dialog-box-removing-input-field-but-keeping-text/12577>\
**Category:** Online experiments\
**Created:** [April 20, 2020, 2:26pm UTC](https://discourse.psychopy.org/t/customizing-the-dialog-box-removing-input-field-but-keeping-text/12577 "2020-04-20T14:26:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicholas\_Borg](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/nicholas_borg/32/7740_2.png) [@Nicholas\_Borg](https://discourse.psychopy.org/u/Nicholas_Borg)\
**Post date:** [April 20, 2020, 2:26pm UTC](https://discourse.psychopy.org/t/customizing-the-dialog-box-removing-input-field-but-keeping-text/12577/1 "2020-04-20T14:26:28Z")

</div>

Hi,

I’d like to customize the dialogue box to remove the input field, as I don’t want or need participants typing anything in the box. However, I want to have some information in the box before the participant presses “OK” to start the experiment.

Currently, it looks like this:

![Capture](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/3/d/3d1ae445eb077cb084ebce3689d1a98f4bb7de25.png)

But ideally, I’d like it like this:

![2Capture](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/1/a/1a0a20a8067bd6ab1999ed9b73600d7f73b68c25.png)  
(edited image)

Is this possible?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Nicholas\_Borg](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/nicholas_borg/32/7740_2.png) [@Nicholas\_Borg](https://discourse.psychopy.org/u/Nicholas_Borg)\
**Post date:** [April 21, 2020, 5:49pm UTC](https://discourse.psychopy.org/t/customizing-the-dialog-box-removing-input-field-but-keeping-text/12577/2 "2020-04-21T17:49:34Z")

</div>

Did a bit of digging and found the solution. Looked into the .js file in the html folder and removed the `dictionary` line containing the ExpInfo (knew of that already) but discovered that there is a `text` parameter to `DlgFromDict` that lets you add information text.

![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/7/4/7473c61b7856f215dd3a98f7296192ec06a21031.png)

Looking at the [DlgfromDict API](https://www.psychopy.org/api/gui.html), I’ve noticed there is a `fixed` parameter. I am thinking of generating a random ID for each participant but keeping this number fixed as to - if I have understood correctly - not allow the participant to edit that field (assuming it will be greyed out).

Assuming I add this function to the code:

```auto
function getRandomInt(min, max) {
  min = Math.ceil(min);
  max = Math.floor(max);
  return Math.floor(Math.random() * (max - min)) + min; 

var randomID = getRandomInt(1000000, 9999999)
}

```

How can I have this number as a non-editable field in the dialogue box? From the [psychojs API](https://github.com/psychopy/psychojs/blob/master/docs/core_GUI.js.html) (is that the right word? Not too savvy with this field) there does not seem to be a `fixed` parameter like there is in the PsychoPy API.

Would highly appreciate any assistance on this.
