Hello. I'm currently trying work on a plugin and I'm running into an issue. Basically, in the plugin options page, I have a form in which the user will input information for an opt-in email. However, I need different forms for each instance of the email form. I'm trying to put this together quickly, so rather than rewrite it, I'm merely modifying the code that already exists.
Here's the problem. I pass the variable for the id of the specific opt-in list to the option form. My intention is to use it as a suffix for each of the option fields.
$savedvar1 ='email_capture_signup_';
$savedvar1 .=$savedformname;
<input type="text" name="<?php echo $savedvar1;?>" class="regular-text code" value="<?php echo get_option($savedvar1); ?>" />
The code works to submit the data, however I can't display the saved value. Passing the variable through get_option() doesn't seem to work. I know I'm not too experienced with Wordpress code, but is there any way to be able pass this information through or will I have to do a database query through wpdb. Unfortunately, the name of the lists has to be dynamic (determined by the user) so I can't just hard code them in there. Thanks for your help.