Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

i have multiple feeds in my blog and i want my subscribers to choose only the feed they are interested to subscribe rather then subcribing the whole blog. Is it possible to give select options on default feedburner subscription form??? something like this

<form class="email-form" onsubmit="window.open('document.email-form.menu.options[document.email-form.menu.selectedIndex].value;return false',  'popupwindow', 'scrollbars=yes,width=550,height=520');return true" target="popupwindow"   method="post" action="http://feedburner.google.com/fb/a/mailverify">
          <input class="email" width="200px" type="text" onblur="if (this.value == '') {this.value = 'enter your email...';}" onfocus="if (this.value == 'enter your email...') {this.value = '';}" value="enter your email..." name="email">
    <select name="menu" value="ALL">
    <option value="http://feedburner.google.com/fb/a/mailverify?uri=oranges">ORANGES</option>
    <option value="http://feedburner.google.com/fb/a/mailverify?uri=apples">APPLES</option>
    <option value="http://feedburner.google.com/fb/a/mailverify?uri=wine">WINE</option>
    </select>
    <input type="hidden" value="oranges" name="uri"/>
    <input type="hidden" value="apples" name="uri"/>
    <input type="hidden" value="wine" name="uri"/>

    <input type="hidden" value="en_US" name="loc">
    <input class="submitbt"  type="submit" value="Submit" name="submit">
    </form>

i dont know what i am doing wrong , may be iam not defining the "uri" correctly or something wrong in onsubmit window.open function, please advise....

share|improve this question

closed as off topic by toscho Jun 7 '12 at 22:41

Questions on WordPress Answers are expected to relate to WordPress within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

2 Answers

Your best bet may be to add a feedburner feed for each category then link to feeds.feedburner.com/account/category or something simular.

share|improve this answer
can i redirect them to email subscription feedburner feeds using dropdown and submit button?? My aim is to build email list of my subscribers.. – Ravi Oct 24 '11 at 20:55

I've just been experimenting with something similar. Basically, you can only submit one email address to one feed at one time, and the crucial hidden value Feedburner needs is in the form itself - therefore you have to determine the user's feed selection before they subscribe.

<?php if(!$_POST['submit']): ?> 

    <form action="subscribe.php" method="post">
    <fieldset>
        <label for="">Please select your preferred sector:</label>
        <label for="regularRadio">
          <input type="radio" name="radios" id="regularRadio" value="feed1" />
          <span>Healthcare</span>
        </label>
        <label for="secondRegularRadio">
          <input type="radio" name="radios" id="secondRegularRadio" value="feed2" />
          <span>Public sector</span>
        </label>
        <label for="thirdRegularRadio">
          <input type="radio" name="radios" id="thirdRegularRadio" value="feed3" />
          <span>Finance</span>
        </label>
        <label for="fourthRegularRadio">
          <input type="radio" name="radios" id="fourthRegularRadio" value="allSectors" />
          <span>All jobs</span>
        </label>
     </fieldset>
    <input type="submit" name="submit" value="Select" />

    </form>

<?php else:
if (!isset($_POST['radios'])) {
    echo '<a href="subscribe.php">Error: please select a sector</a>';
        } else {
            echo '<h2>Data</h2>';
            print_r($_POST);
    ?>

<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=<?php echo $_POST['radios']; ?>', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">

<p>Now enter your email address:</p>

        <p><input type="text" name="email"/></p>

        <input type="hidden" value="<?php echo $_POST['radios']; ?>" name="uri"/>
        <input type="hidden" name="loc" value="en_US"/>
        <input type="submit" value="Subscribe" />

        <p>Delivered by <a href="http://feedburner.google.com" target="_blank">FeedBurner</a></p>

</form>

<?php } endif; ?>

So, in effect a two-stage form that sets up subscriptions with Feedburner. Naturally, you have to create your feeds in Feedburner beforehand.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.