Hello Ole!
You can do it trough call manually the PHP function:
<?php
$form_code=$Knews_plugin->getForm();
?>
Then, replace the email input field as hidden field with email value inside, and print the form…
Another way is directly add the user callling Knews function:
function add_user($email, $id_list_news, $lang=’en’, $lang_locale=’en_US’, $custom_fields=array(), $bypass_confirmation=false)
This functions are in the main knews.php file.
Regards,
Carles.
Hi Carles,
I am not that strong in php.
Will above codesnip insert the e-mail value into the widget, in the e-mail field?
Your first suggesion, i do not get where to instert this line??
The next line, will override whatever the user has typed in the e-mail field??
Hello Ole. Needs some PHP skills to do what you want. The way is get the code in a variable in your PHP theme file, not through the widget:
<?php
$form_code=$Knews_plugin->getForm();
?>
Then use the str_replace() function to change the form HTML, and produce a HTML with replaced email input field by email hidden field, with the value of your subscriber and delete the label also, then print the code.
Regards,
Carles.