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

# form\_page(3x)

set and get form page number

## NAME

**form\_page** - set and get form page number

## SYNOPSIS

**#include \<form.h\>**\
 int set\_current\_field(FORM \*form, FIELD \*field);\
 FIELD \*current\_field(const FORM \*);\
 int set\_form\_page(FORM \*form, int n);\
 int form\_page(const FORM \*form);\
 int field\_index(const FIELD \*field);\

## DESCRIPTION

The function **set\_current field** sets the current field of the given form; **current\_field** returns the current field of the given form.

The function **set\_form\_page** sets the form's page number (goes to page *n* of the form).

The function **form\_page** returns the form's current page number.

The function **field\_index** returns the index of the field in the field array of the form it is connected to. It returns **ERR** if the argument is the null pointer or the field is not connected.

## RETURN VALUE

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

- **E\_OK**

  The routine succeeded.

- **E\_BAD\_ARGUMENT**

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

- **E\_BAD\_STATE**

  Routine was called from an initialization or termination function.

- **E\_INVALID\_FIELD**

  Contents of a field are not valid.

- **E\_REQUEST\_DENIED**

  The form driver could not process the request.

- **E\_SYSTEM\_ERROR**

  System error occurred (see **errno**).

## SEE ALSO

**curses**(3X), **form**(3X).

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