form\_opts(3X) Library calls form\_opts(3X)

# [NAME](#NAME)

**set\_form\_opts**, **form\_opts\_on**, **form\_opts\_off**, **form\_opts** - set and get form options

# [SYNOPSIS](#SYNOPSIS)

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

```
int set_form_opts(FORM *form, Field_Options opts);
Field_Options form_opts(const FORM *form);
```

```
int form_opts_on(FORM *form, Field_Options opts);
int form_opts_off(FORM *form, Field_Options opts);
```

# [DESCRIPTION](#DESCRIPTION)

The function **set\_form\_opts** sets all the given form's option bits (form option bits may be logically “or”-ed together).

The function **form\_opts\_on** turns on the given option bits, and leaves others alone.

The function **form\_opts\_off** turns off the given option bits, and leaves others alone.

The function **form\_opts** returns the form's current option bits.

The following options are defined (all are on by default):

[O\_NL\_OVERLOAD](#O_NL_OVERLOAD)

Overload the **REQ\_NEW\_LINE** forms driver request so that calling it at the end of a field goes to the next field.

[O\_BS\_OVERLOAD](#O_BS_OVERLOAD)

Overload the **REQ\_DEL\_PREV** forms driver request so that calling it at the beginning of a field goes to the previous field.

# [RETURN VALUE](#RETURN_VALUE)

Except for **form\_opts**, each routine returns one of the following:

[**E\_OK**](#E_OK)

The routine succeeded.

[**E\_SYSTEM\_ERROR**](#E_SYSTEM_ERROR)

System error occurred (see [**errno**(3)](/man/os/ncurses/errno.3)).

# [PORTABILITY](#PORTABILITY)

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

# [AUTHORS](#AUTHORS)

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

# [SEE ALSO](#SEE_ALSO)

[**curses**(3X)](/man/os/ncurses/curses.3X), [**form**(3X)](/man/os/ncurses/form.3X)

2025-01-18 ncurses 6.6

---

Document: form_opts(3x) from ncurses 6.6.20261031-r0 (Chainguard OS)
Source: https://github.com/ThomasDickey/ncurses-snapshots
