---
name: "form_field_attributes"
section: "3x"
platform: "macos"
package: "ncurses"
version: "79"
release: "macOS 26.5"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/form_field_attributes/3x"
---

# form\_field\_attributes(3x)

color and attribute control for form fields

## 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**).

## SEE ALSO

**curses**(3X) and related pages whose names begin "form\_" for detailed descriptions of the entry points.

## NOTES

The header file **\<form.h\>** automatically includes the header file **\<curses.h\>**.

## 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.
