Jump to content

Question - Experienced Coders


andreasmenon

Recommended Posts

This is an issue that has been bugging me for a while. Say, for example, you want to create an 'Add Gender Profile Field' for a forum system, specifically InvisionFree, (I know it already exists - this is just for the sake of an example) code out of scratch. You insert the dropdown box into the table in the Edit Profile Info page. The user selects his gender and clicks on the 'Amend my profile' button. Once the page comes back, the dropdown box won't have the option the user selected, but rather the default/first option - I'm looking for a way to change this and make it save the data no matter how many times the page is refreshed. Is anybody familiar with a way to achieve this?I've tried but I haven't had any results.Keep in mind I have no access to the HTML/PHP and I cannot add PHP.Thanks to everyone who tries to help! :)

Link to comment
Share on other sites

Hi there. Save the data in another one of the fields and when the page loads, read the data from that field, append the drop down box to the page and use the selectedIndex to specify which one you've selected.So say, your "location" box will have something like:United Kingdom//Gender=2and you'll split it at "//Gender=", see what's after, and use that as your selectedIndex.=)

Link to comment
Share on other sites

You can still save the fields somewhere in one of the profile fields without showing the normal boxes. Just do something like:if(location.href.match(/act=UserCP&CODE=01&showgender/i){}Hide the existing form and show your own. On click of your "submit" button, add the information back into the location field, and away you go.You'll need a bit extra, to load the info back in when they visit the &showgender link, and also on the usual CODE=01 page to remove the extra bits from the Location field (and put it back in when they submit), but that's about it really.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...