PHPackages                             xamin/form - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. xamin/form

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

xamin/form
==========

A Form library with Agavi integration.

9511PHP

Since Nov 19Pushed 12y ago1 watchersCompare

[ Source](https://github.com/everplays/agavi-form-models-set)[ Packagist](https://packagist.org/packages/xamin/form)[ RSS](/packages/xamin-form/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Agavi-Form-Models-SET
=====================

[](#agavi-form-models-set)

This is a set of models for Agavi framework which helps you create forms and validate user input based on them.

Installation
------------

[](#installation)

make a module called Form in your project then put contents of src into models directory of your Form module:

```
$ cd /path/to/your/agavi/project
$ agavi module-create
...
Module name: Form
...
$ cp -r /path/to/agavi-form-models-set/src/* app/modules/Form/models/

```

also you need to load css/js files in client directory into your page.

### I have a Form module already, what should i do?

[](#i-have-a-form-module-already-what-should-i-do)

you can put models into your existing Form module, but if there's any name conflict or you just don't want to do it make WhatEverYouWant module &amp; replace all `Form_` with `WhatEverYouWant_` in models:

```
$ find /path/to/agavi-form-models-set/src -name "*php" -exec sed -i 's/Form_/WhatEverYouWant_/g' {} \;

```

How to use it?
--------------

[](#how-to-use-it)

### Making a form

[](#making-a-form)

```

```

also you can make a form using lazy config

```

```

### You said i can validate user input by a form, how's that?

[](#you-said-i-can-validate-user-input-by-a-form-hows-that)

```

```

### how to render a form?

[](#how-to-render-a-form)

just pass your `Form_FormModel` instance to your template/view &amp; render it like `$form->html()`.

### What is form's markup?

[](#what-is-forms-markup)

generated markup is based on twitter-bootstrap.

### What about other output types?

[](#what-about-other-output-types)

only html is supported, you have to implement other representations if you need.

### is there any support for client validation?

[](#is-there-any-support-for-client-validation)

yes, currently jQueryValidationEngine is supported, when you're rendering the form pass client validation as first parameter like: `$form->html('jQueryValidationEngine')`.

### I want to use another client validation, what should i do?

[](#i-want-to-use-another-client-validation-what-should-i-do)

`jQueryValidationEngine` is a method on elements, output of `html` method will be passed to it so we alter html markup for client validation. you can do the same. just make your validation method on elements &amp; let html method know what's it.

### any support for conditional elements?

[](#any-support-for-conditional-elements)

Yes, take a look at above example, as you can see email will be validated if `subscribe?` checkbox has been checked by user.

### I've a complex element how i can validate it?

[](#ive-a-complex-element-how-i-can-validate-it)

define `registerValidators` method on your element, you will get following parameters: `AgaviValidationManager $vm, array $depends, array $unvalidatedParameters, array $unvalidatedFiles` so you can register your validators into AgaviValidationManager.

### what is resource element?

[](#what-is-resource-element)

think it's a replacement for html's select element based on autocomplete of jquery-ui so you can expect anything you expect from jquery-ui autocomplete but there's more: think you want to load cities based on states, for example only show cities of New York when user has selected New York as State.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/194719?v=4)[Behrooz Shabani](/maintainers/everplays)[@everplays](https://github.com/everplays)

---

Top Contributors

[![everplays](https://avatars.githubusercontent.com/u/194719?v=4)](https://github.com/everplays "everplays (8 commits)")

### Embed Badge

![Health badge](/badges/xamin-form/health.svg)

```
[![Health](https://phpackages.com/badges/xamin-form/health.svg)](https://phpackages.com/packages/xamin-form)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
