Username from e-mail

As far as i know there is no hook or filter to provide a custom User name for default registration process, however if you really want to modify it, you can alter the $_POST data. here is the sample code: add_action(‘wp_loaded’, ‘wpse_138736_filter_username’); function wpse_138736_filter_username(){ //your code to extract username from email $_POST[‘user_login’] = ‘test’; } … Read more

Gravity Forms After Submission – GFFormsModel::update_lead_field_value?

Going to close this and answer myself. Apparently, there is something wrong with the way that GFFormsModel::update_lead_field_value truncates fields. I was unable to get this to work. Instead – I opted to use a direct WP insert (with if elseif etc…) – like so : $csql = $wpdb->insert(“wp_rg_lead_detail”, array(“id” => NULL,”lead_id” => $lead,”form_id” => $form,”field_number” … Read more

Display single post inside accordion based on form submission results

Closing off as the issue is resolved. For anyone interested, the result is as follows (refer to the code detailed above for the initial DB-table connections, as the code below refers to the output only): if (isset($SelectedLocationID) && isset($SelectedSchoolID)) { ?> <div id=”resultsDiv”> <div id=”resultsHead”> <h3>Search results for routes between:</h3> <b><?php echo $selectedLocationName; ?></b> and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)