---
name: "set_field_fore"
section: "3form"
platform: "linux"
package: "ncurses-doc"
version: "6.5+20250216-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/field_attributes"
---

# set\_field\_fore(3form)

color and attribute control for form fields

Part of [field\_attributes(3form)](/field_attributes/3form.md).

## NAME

**form\_field\_attributes** - color and attribute control for form fields

## SYNOPSIS

```
#include <form.h>
```

**int set\_field\_fore(FIELD \****field***, chtype** *attr***);** **chtype field\_fore(const FIELD \****field***);**

**int set\_field\_back(FIELD \****field***, chtype** *attr***);** **chtype field\_back(const FIELD \****field***);**

**int set\_field\_pad(FIELD \****field***, int** *pad***);** **int field\_pad(const FIELD \****field***);**

## DESCRIPTION

**The function set\_field\_fore sets the foreground attribute of** *field***. This is the highlight used to display the field contents.  The** **function field\_fore returns the foreground attribute.** **The default is** **A\_STANDOUT.**

**The function set\_field\_back sets the background attribute of** *form***. This is the highlight used to display the extent fields in the** **form.** **The function field\_back returns the background attribute.** **The** **default is A\_NORMAL.**

**The function set\_field\_pad sets the character used to fill the field.** **The function field\_pad returns the given form's pad character.** **The** **default is a blank.**

## RETURN VALUE

**These routines return one of the following:**

- **E\_OK**

  **The routine succeeded.**

- **E\_BAD\_ARGUMENT**

  **Routine detected an incorrect or out-of-range argument.**

- **E\_SYSTEM\_ERROR**

  **System error occurred (see [errno(3)](/errno/3.md)).**

## PORTABILITY

**These routines emulate the System V forms library.** **They were not supported on** **Version 7 or BSD versions.**

## AUTHORS

**Juergen Pfeifer.** **Manual pages and adaptation for new curses by Eric S. Raymond.**

## SEE ALSO

**ncurses(3NCURSES) and related pages whose names begin “form\_”** **for detailed descriptions of the entry points.**
