Skip to:
Content
Pages
Categories
Search
Top
Bottom

Edit screen on plugin throwing WordPress ”Are you sure?…” error page

  • @_td

    Member

    I’m creating a plugin that lets me add custom fields to a group. I’ve got the create screen working to where my fields show correctly and I can set them when I’m creating the group.

    However, no matter what I’ve tried, whenever I go into the group to edit my custom fields, I get the “Are you sure you want to do this…” standard WordPress error page. I’ve even tried having just one line of HTML in there and it’s still throwing that error. Here’s my function:

        function edit_screen() {
    global $bp;
    
    if ( !bp_is_group_admin_screen($this->slug) )
    return false; ?>
    
    <h2>name ) ?></h2>
    <label for="hcc_group_zip">Zip Code</label>
    If the group meets in various houses in different zip codes, just use the leader's zip code.
    
    <input type=&quot;text&quot; size=&quot;6&quot; name=&quot;hcc_group_zip&quot; id=&quot;hcc_group_zip&quot; value=&quot;groups->current_group->id, 'hcc_group_zip' )); ?>" />
    
    <label for="hcc_group_meeting_time">This group meets on:</label>
    groups->current_group->id, 'hcc_group_meeting_time' ); ?>
    
    <option value=&quot;Sunday&quot; selected="selected">Sunday
    <option value=&quot;Monday&quot; selected="selected">Monday
    <option value=&quot;Tuesday&quot; selected="selected">Tuesday
    <option value=&quot;Wednesday&quot; selected="selected">Wednesday
    <option value=&quot;Thursday&quot; selected="selected">Thursday
    <option value=&quot;Friday&quot; selected="selected">Friday
    <option value=&quot;Saturday&quot; selected="selected">Saturday
    
    <label for="hcc_group_marital_status">Marital status of people in this group:</label>
    
    groups->current_group->id, 'hcc_group_marital_status'); ?>
    <option value=&quot;Mixed&quot; selected="selected">Mixed.  Some are married, some are single
    <option value=&quot;Married&quot; selected="selected">Everyone in this group is married.
    <option value=&quot;Single&quot; selected="selected">Everyone in this group is single.
    
    <label for="hcc_group_children">Do people in this group have children?</label>
    
    groups->current_group->id, 'hcc_group_children'); ?>
    <option value=&quot;None&quot; selected="selected">No one in this group has children
    <option value=&quot;Some&quot; selected="selected">Some people have children
    <option value=&quot;Everybody&quot; selected="selected">Everybody has children
    
    <label for="hcc_group_study">What we're currently studying</label>
    groups->current_group->id, 'hcc_group_study'); ?>
    <input type=&quot;text&quot; name=&quot;hcc_group_study&quot; id=&quot;group-study&quot; value=&quot;" />
    slug,'_wpnonce'); ?>
    
    <?php
    
    }

    The “Create screen” works and has that same code in it. So that’s why I’m getting really confused why I’m getting this error page whenever I click on the link in the admin to my custom forms and get the error message.

    Here’s the link:

    Any general tips/suggestions would be great. Thanks!

    T

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Edit screen on plugin throwing WordPress ”Are you sure?…” error page’ is closed to new replies.
Skip to toolbar