Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Adding new fields ok, but how to set start-values

Quote Reply
Adding new fields ok, but how to set start-values
Hi all, make my first steps with the 2.1;

i have no prob to add new fields, no probs to add the form fields in templates.

But how could i give the start value?

Cause for adding users there are only add and success template;

so when i call the add the new vars are not known from system;

somewhere in script must be something like:

username=""; email="";

I will find it, shure, but then i will alter the source with

newfield=""; and got probs with the next update ?!



Robert
Quote Reply
Re: [Robert] Adding new fields ok, but how to set start-values In reply to
Ok, found it in admin/Links/User/login.pm Line 33;

but as i said, now i have a new source ?!

Any idea how i can take another way, to hold the original code?

Robert
Quote Reply
Re: [Robert] Adding new fields ok, but how to set start-values In reply to
I'm not sure what you are trying to do.

You can set "default" values in the database (by editing the table), or you can set default values via the template using the "value='some_value'" tag.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Adding new fields ok, but how to set start-values In reply to
Hi Robert,
Real example:
admin\Links\User\Login.pm ; Line 33

Code:
# -- Value for new fields defined -> signup_form.html
##--## print Links::SiteHTML::display ('signup_form', { Username => '', Password => '', Email => '' });
print Links::SiteHTML::display ('signup_form', { Username => '', Password => '', Email => '', Name => '', Telefon => '' });



This is nothing special and while i try to understand which script calls which function in which other script, i will find the right places to change what i need, BUT I STILL CHANGE THE SOURCE !!! That´s my problem, cause though we have the plugin-system, i must compare the old and the new sources when an update arrives. So i have the same hard work as with the 1.13.

I have no single clue how the plugins work (still now), but i want to know if i could do this without changing the code.

Robert