Log in

View Full Version : Submit Form in Navbar


MrSDavidson
10-27-2005, 09:18 PM
Is it possible to update a Single-Selection Menu with a save button in the Navbar rather than in User Control Panel > Edit Options.
If so could someone possibly give me some directions as to how to do this?

timetunnel
10-28-2005, 03:21 AM
Hello.

Not quite sure I follow...

Can you provide an example, please?

Thanks.

MrSDavidson
10-28-2005, 08:22 AM
Like this, I have it where I need just need some pointers as how to submit the new data to the correct place

<if condition="$show['member']">
<td class="vbmenu_control"><a>Member Mood Display:</a>
<form action="profile.php?do=editoptions" method="submit">

<input type="hidden" name="userfield[field5_set]" value="1" />

<select name="userfield[field5]" id="csel_field5">
<option value="0" ></option>
<option value="1" >accomplished</option><option value="2" >aggravated</option> ETC ETC...
</select>
<input type="submit" class="button" value="Save" accesskey="s" />
</form>
</if>

thats the code im using so perhaps iv missed something simple out of it

timetunnel
10-28-2005, 04:34 PM
Hello.

Before looking into this code deeper, I noticed something:

in the following code,

<form action="profile.php?do=editoptions" method="submit">

you have method="submit" when it should be either 'post' or 'get'. Granted, I haven't looked into updated HTML changes so if 'submit' is a new option for method, I didn't know...

Guest190829
10-28-2005, 04:43 PM
You would have to send that to a php file that will insert or update that field with the drop down value.

MrSDavidson
10-28-2005, 07:54 PM
Cheers, anyone be able to give me some pointers as to how to do that in php? unfortunitly its not one of the languages I know.

Another Q, seeing as there is a php file that does this [profile.php] cant I send it directly to it?

MrSDavidson
10-30-2005, 08:36 PM
anyone willing to give me Any pointers?