CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Newsletter signup form - no redirect - Help!
Pages: [1]

Author Topic: Newsletter signup form - no redirect - Help!  (Read 1464 times)

bcobin

  • I post frequently
  • ***
  • Posts: 337
  • Karma: 9
    • InterCreative Media
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.9
  • PHP version: 5.3
Newsletter signup form - no redirect - Help!
December 17, 2008, 11:32:58 am
Drupal 5.12, CiviCRM 2.0.7

I need to do something that should be simple, but it's been a nightmare so far:

I want to have a simple login form for subscribing to a newsletter - first name, last name and e-mail. When a new user subscribes, he/she should be included in a group. This much I've managed to get working using some of the QuickAdd code and profile standalone code.

The Drupal CiviCRM Subscribe module just puts me in an endless loop and the CiviCRM Subscribe process requires a double opt-in. I need for the user enter his/her info as described above and that's it - no confirmations or double opt-ins.

Upon submission, the user should be taken back to whatever page they were on, or the home page - really, almost anywhere <b>except</b> CiviCRM. But now, form submission goes to the dashboard page, no matter what I do.

A redirect is pretty basic - can't imagine why all this should be so hard.

Any ideas here? I'm stumped. I'll attach the code for my custom block - maybe someone can help! Thank you...
Code: [Select]
<form action="http://xxx.xxx.xxx.xxx:8888/dev_site/civicrm/contact/add?reset=1&amp;ct=Individual&amp;gid=1" method="post">

<div><input name="postURL" type="hidden" value="http://xxx.xxx.xxx.xxx:8888/dev_site/" />
<input name="redirect" type="hidden" value="http://xxx.xxx.xxx.xxx:8888/dev_site/" /></div>

<div><input name="group[1]" type="hidden" value="1" /></div>

<div class="form-item">
    <div>
        <label for="qa_first_name">First Name:</label>
    </div>
    <div>
        <input type="text" name="first_name" id="qa_first_name" class="form-text" maxlength="64" />
    </div>
</div>

<div class="form-item">
    <div>
        <label for="qa_last_name">Last Name:</label>
    </div>
    <div>
        <input type="text" name="last_name" id="qa_last_name" class="form-text required" maxlength="64" />
    </div>
</div>

<div class="form-item">
    <div>
        <label for="qa_email">Email:</label>
    </div>
    <div>
        <input type="text" name="location[1][email][1][email]" id="qa_email" class="form-text" maxlength="64" />
    </div>

    <input type="hidden" name="location[1][location_type_id]" value="1" />

    <input type="hidden" name="location[1][is_primary]" value="1" />
    <input type="hidden" name="ct" value="Individual" />
        </div>

<div class="form-item"><input type="submit" name="_qf_Edit_next" value="GO" class="form-submit" /></div>
<input type="hidden" name="redirect" value="http://xxx.xxx.xxx.xxx:8888/dev_site/">

</form>




Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Newsletter signup form - no redirect - Help!

This forum was archived on 2017-11-26.