Submission: How to remove placeholder text from input fields

98 views
Skip to first unread message

Franziska Rapp

unread,
May 22, 2024, 7:23:08 AM5/22/24
to DSpace Technical Support

Hi,

We would like to remove the placeholder text in the input fields during submission, e.g. "Author" in the Author field, "Title" in the Title field etc.

Which modifications do we need to make?

Your help is much appreciated.

Best regards
Franziska

-- 
Franziska Rapp
Communication and Information Center (kiz)
Ulm University

Michael Plate

unread,
May 22, 2024, 8:18:24 AM5/22/24
to dspac...@googlegroups.com
Hi Franziska,

Am 22.05.24 um 13:23 schrieb Franziska Rapp:
> Hi,
>
> We would like to remove the placeholder text in the input fields during
> submission, e.g. "Author" in the Author field, "Title" in the Title
> field etc.
>
> Which modifications do we need to make?
[…]

solution is CSS:

dynamic-ng-bootstrap-input input[type=text]::placeholder{
opacity: 0 !important;
}

this is just for the standard text input (onebox), it works by setting
the opacity of the placeholder to 0, so the placeholder is there, but
not visible

solution in Typescript:

in your dspace-angular folder, open

src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts

and in the ngOnInit function set the placeholder of the model to be empty:

[…]
ngOnInit(): void {

if( this.model.inputType=='text') {
this.model.placeholder='';
}
[…]

there are other places maybe…

CU

Michael

Franziska Rapp

unread,
May 28, 2024, 6:12:15 AM5/28/24
to dspac...@googlegroups.com
Thanks Michael for you quick help.

Best regards
Franziska
Reply all
Reply to author
Forward
0 new messages