PHP code example of halasz / trynx-support-form

1. Go to this page and download the library: Download halasz/trynx-support-form library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

halasz / trynx-support-form example snippets


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

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

{control SupportForm}

[
	'sync_token' => 'token',
	'dataxml' => '<xml>
<cl_users_id>123</cl_users_id>
<email>email</email>
<user_name>name</user_name>
<subject>subject</subject>
<message>message</message>
<screenshot>screenshot in BASE64</screenshot>
<file1>fileName1.ext</file1>
<file2>fileName2.ext</file2>
<file3>fileName3.ext</file3>
</xml>'
]

[
	'sync_token' => 'tokem',
	'dataxml' => '<xml>
<email>email</email>
<user_name>name</user_name>
<subject>subject</subject>
<message>message</message>
<screenshot>screenshot in BASE64</screenshot>
<file1>fileName1.ext</file1>
<file2>fileName2.ext</file2>
<file3>fileName3.ext</file3>
</xml>'
]

[
	'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' => [...]
]
xml
<xml>
<status></status>
<error_message></error_message>
</xml>
xml
<xml>
<status>OK</status>
<error_message></error_message>
</xml>