PHP code example of intotheweb101 / partialuserforms
1. Go to this page and download the library: Download intotheweb101/partialuserforms 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/ */
intotheweb101 / partialuserforms example snippets
class PartialSubmissionJobExtension extends Extension
{
/**
* Remove records that do not have an email address
* to reduce the amount of useless records
* @param $csvArray
* @param $editableFields
*/
public function updateCSVRecords(&$csvArray, $editableFields)
{
$emailAddress = array_search('email_address', array_keys($editableFields));
foreach ($csvArray as $key => $value)
{
if (empty($value[$emailAddress])) {
unset($csvArray[$key]);
}
}
}
}