What is the correct form action URL for network options pages?

When referring to urls within the network-admin, you should consider the
network_admin_url(). core function, that falls back to admin_url() for non-multisite setups.

So try this, using add_query_arg just as @toscho uses in the answer OP links to:

echo esc_url( 
    add_query_arg( 
       'action', 
       'your_option_name', 
       network_admin_url( 'edit.php' ) 
    ) 
);

instead of hard-coding it with possible wrong assumptions of the install path.

Here we escape the output for use in the HTML action attribute.

Leave a Comment