Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Carry forward USER data into Add Link page

Quote Reply
Carry forward USER data into Add Link page
Hi

I would like to carry forward some USER data when a user submits a link, how do I do that?

For example, if I add a field to the user registration form for 'country' to indicate which country they are located in, can that field be carried forward to the link submission form?

any help appreciated, Thanks
Colin Thompson
Quote Reply
Re: [colintho] Carry forward USER data into Add Link page In reply to
You could just access it via <%user.FIELD%>

So if your field is called "Country", then you would use:

<%user.Country%>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Carry forward USER data into Add Link page In reply to
That works just fine.

Many Thanks Andy
Colin Thompson
Quote Reply
Re: [colintho] Carry forward USER data into Add Link page In reply to
I would like to pass the USER field through / with the add.cgi ( include_form) so that its hidden

At present its being passed through the include_form and some users are editing the field

I would like the USER value to be passed through add.cgi without the user seeing it

Thanks
Colin Thompson

Last edited by:

colintho: Mar 4, 2010, 1:45 AM
Quote Reply
Re: [colintho] Carry forward USER data into Add Link page In reply to
Put them as <input type="hidden" fields then Tongue

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Carry forward USER data into Add Link page In reply to
I tried but must have got something wrong !!!

What code would I need to add and where?

Thanks

Currently I have this ( as you might imagine, this causes some confusion for users, when they see 2 URL fields )

I have UserURL as a field in the USER table

<div class="row clear">
<label for="UserURL" class="name">Your Website:</label>
<div class="value">
<input type="text" id="UserURL" name="UserURL" value="<%if UserURL%><%escape_html user.UserURL%><%endif%>" class="text" />
</div>
</div>
Colin Thompson

Last edited by:

colintho: Mar 4, 2010, 2:23 AM
Quote Reply
Re: [colintho] Carry forward USER data into Add Link page In reply to
Just remove all that code you pased, and replace it with this (just before the </form> bit);'

Code:
<input type="hidden" name="UserURL" value="<%if UserURL%><%escape_html user.UserURL%><%endif%>"/>

Should be as simple as that :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Carry forward USER data into Add Link page In reply to
Andy

you are a Star, works fine

Many Thanks
Colin Thompson