PHPackages                             halasz/trynx-support-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. halasz/trynx-support-form

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

halasz/trynx-support-form
=========================

Support form for web applications.

v1.0.6(4y ago)144BSD-3-ClauseJavaScriptPHP &gt;=7.1

Since Dec 21Pushed 4y ago2 watchersCompare

[ Source](https://github.com/TomasHalasz/trynx-support-form)[ Packagist](https://packagist.org/packages/halasz/trynx-support-form)[ RSS](/packages/halasz-trynx-support-form/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (7)Dependencies (9)Versions (8)Used By (0)

Quickstart
==========

[](#quickstart)

This extension add feedback form to your application.

Instalation
-----------

[](#instalation)

#### Download

[](#download)

The best way to install `Halasz/TrynxSupportForm` is using Composer:

```
$ composer require halasz/trynx-support-form
```

#### Registering

[](#registering)

You can enable the extension using your neon config:

```
extensions:
	TrynxSupportForm: Halasz\Support\SupportExtension
```

#### Injecting

[](#injecting)

You can simply inject factory in Your Presenters/Services:

```
public function __construct(Halasz\Support\Support\ISupportFormFactory $SupportFormFactory)
{
    parent::__construct();
    ....
}
```

#### Presenter

[](#presenter)

When you need to create component in your presenter for use in template you can do it as shown bellow. Don't forget use namespace Halasz:

```
    protected function createComponentSupportForm()
    {
        return $this->supportForm->create();
    }

```

#### Templates

[](#templates)

Create method of interface ISupportFormFactory returns an component, so in your .latte you can simply call:

```
{control SupportForm}
```

Default .latte file used to draw the component you can find in samples folder. You can copy this template and customize it. Path to the template you can specify via your config file.

#### Reqirements

[](#reqirements)

**IMPORTANT!!!** you must link the css and js files from samples folder into your template. After that you need to call `halasz.SupportForm.init();` in your js code - **AFTER jQuery!!!**. This extension requires *jQuery v3.4.1*, *Bootstrap v3.3.7*, *netteForms.js v3* and *html2canvas 1.0.0-rc.5*. All of theese are included in samples folder.

Configuration
-------------

[](#configuration)

All config is **optional**.

Configuration must be specified in config file:

```
TrynxSupportForm:
	template: 'path/to/customized/template.latte'
	maxFiles: 3                                             # max files in multiselect
	maxFileSize: 3145728                                    # max size of one file in musltiselect (in bytes)
	title: 'Feedback form'                                  # title of modal (top right text)
	invokeButtonText: 'online support'                      # text in button (bottom right on page)
	sendButtonText: 'Send feedback'                         # text in send button
	screenshotButtonText: 'Add Screenshot'                  # text in button which is used to make screenshot
	postUrl: 'http://halasz.ajaximple.cz/www/test/test'     # URL address where may be send data from formular
	syncToken: 'nothing'                                    # sync token, which is send to url with data from formular
	idEmail: 'email_identity_column_name'                   # email column name in $this->user->getIdentity();
	idEmail2: 'alternate email_identity_column_name'        # column name with alternate email in $this->user->getIdentity(); if it's value is not empty, it's used instead idEmail
	idName: 'username_identity_column_name'                 # username column name in $this->user->getIdentity();
	defaultEmail: 'your@email.com'				# default email address for use when email in getIdentity() is empty
	flashMessage:
		success: 'Your feedback has been sent. We will send E-Mail to you as soon as possible.'
		error: 'We have encountered an error. Please try it again later.'
	labels:                                                 # labels to form inputs
		message: 'Your message'
		image: 'Add screenshot'
		files: 'Add files'
		name: 'Name'
		email: 'E-Mail'
		subject: 'Subject'
	errors:                                                 # Theese texts are shown under inputs when there is an error.
		message: 'Required'
		name: 'Required'
		email: 'Required'
		subject: 'Required'
		image: 'Uploaded file must be an image'
		files_max: 'You can upload maximum %d files'
		files_size: 'Maximum file size is 3MB'
		files_mimes: 'Is allowed to upload only files with this types: GIF, JPG, PNG, txt, xls, doc, zip or rar'
```

Receive data on specified URL
-----------------------------

[](#receive-data-on-specified-url)

#### In PHP:

[](#in-php)

**Data are sent by POST method.**In $\_POST are included data in format:

##### If user is logged in:

[](#if-user-is-logged-in)

```
[
	'sync_token' => 'token',
	'dataxml' => '
123
email
name
subject
message
screenshot in BASE64
fileName1.ext
fileName2.ext
fileName3.ext
'
]
```

##### If user is not logged in:

[](#if-user-is-not-logged-in)

```
[
	'sync_token' => 'tokem',
	'dataxml' => '
email
name
subject
message
screenshot in BASE64
fileName1.ext
fileName2.ext
fileName3.ext
'
]
```

in both cases can be files1-3 accessed via $\_FILES Example of $\_FILES content

```
[
	'fileName1_ext' => [
		name => 'randomTMPname',
		type => 'mime/type',
		tmp_name => 'path/to/tmp/folder/and/tmp/name/of/file'
		error => value,
		size => sizeOfFileInBytes
	],
	'fileName2_ext' => [...],
	'fileName3_ext' => [...]
]
```

### Screenshot tips

[](#screenshot-tips)

Screenshot is generated from body element of page. Screenshot is taken according to size of body element. In some layout cases is possible that body doesn't have correct height, so if this issue hapen's to you, check height of body element.

Returned data from specified URL
--------------------------------

[](#returned-data-from-specified-url)

This component is expecting XML with specified structure.

```

```

##### If everything is correctly processed:

[](#if-everything-is-correctly-processed)

```

OK

```

##### In case of some errors:

[](#in-case-of-some-errors)

```

ERROR
Described error. Remember, it's shown to user.

```

Translation
-----------

[](#translation)

Component has autowired translator, which is registered in config file and implements `Nette\Localization\ITranslator` see [Nette Localization](https://doc.nette.org/cs/3.0/localization "Nette Localization")

Conclusion
----------

[](#conclusion)

This extension requires Nette3 and it is property of Tomas Halász © 2019

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.3% 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.

###  Release Activity

Cadence

Every ~113 days

Recently: every ~168 days

Total

7

Last Release

1652d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/165e8eee878c0bc8c1d8826fed6ab61626cf98e26340bf1042dec8916aca5d4e?d=identicon)[TomasHalasz](/maintainers/TomasHalasz)

---

Top Contributors

[![TomasHalasz](https://avatars.githubusercontent.com/u/4027431?v=4)](https://github.com/TomasHalasz "TomasHalasz (8 commits)")[![TonnyJe](https://avatars.githubusercontent.com/u/9120518?v=4)](https://github.com/TonnyJe "TonnyJe (7 commits)")

### Embed Badge

![Health badge](/badges/halasz-trynx-support-form/health.svg)

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

###  Alternatives

[nette/code-checker

✅ Nette CodeChecker: A simple tool to check source code against a set of Nette coding standards.

881.7M6](/packages/nette-code-checker)[tomaj/nette-api

Nette api

36261.8k4](/packages/tomaj-nette-api)[ipub/gravatar

Gravatar creator for Nette Framework

122.0k1](/packages/ipub-gravatar)

PHPackages © 2026

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