Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Change Database City to Enum does nothing.

Quote Reply
Change Database City to Enum does nothing.
Hi,

I have changed the 'City' field in the demographics database to be an Enum/Select field with 3 entries.

The record seems to have been updated successfully, but on the signup page and all of the internal user pages it is still returning the standard text field and not the new select menu.

Any idea why? Or am I doing something wrong?

Cheers,
R.

Quote Reply
Re: Change Database City to Enum does nothing. In reply to
Hi,

No, the user pages do not use auto generated forms, so you need to manually change them in the signup and profile pages. This was to ensure that the look could be altered.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Change Database City to Enum does nothing. In reply to
Hi Alex,

I've just had another look at this in the admin area, and the column I have set as a SELECT comes up inside what "looks" like a multiselect text field - but isn't as you can only select one.

Is there any way to make this field come up as a select pull down menu in the admin area? I want to add a list of countries to field as an ENUM type - but as it is that would make viewing a users record pretty loooooooooooonnnnnggggg without one.

?

Cheers,
R.

Quote Reply
Re: Change Database City to Enum does nothing. In reply to
Hi,

Set size=0 in the properties page and that will make it look like a regular select list.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Change Database City to Enum does nothing. In reply to
Excellent! That worked a treat!

In case anyone else wants to do the same, you set the:

Form Size = 0

(not the column size).

Cheers!

Regan.


Quote Reply
Post deleted by ryel01 In reply to
Hi Alex,

One more question for you - even though I have set the 'City' field to an ENUM type with 3 values, the user can still submit 'anything' in the city field and it is accepted.

I would have thought the ENUM type would have stopped any inserts that didn't match a value in the column and returned the user an error? Is there another field that I need to enter the values into? I've tried the regex field but that doesn't seem to be the one.

Cheers,
Regan.
Quote Reply
Re: Change Database City to Enum does nothing. In reply to
Hi,

You should be able to do it with the regex field, just set it to:

^(Option1|Option2|Option3)$

and it should only allow Option1, Option2 or Option3 to be entered.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Change Database City to Enum does nothing. In reply to
Cheers thanks for that,

Whoops! I just deleted the post you replied to instead of editing it ?:)

Like an idiot I think I was testing it with the address book entries and not the users profile.... so of course it would accept anything *duh!*

Cheers,
Regan.