[support] Views 2 field question
Larry Garfield
larry at garfieldtech.com
Fri Jul 4 18:41:03 UTC 2008
On Friday 04 July 2008 10:30:22 am Edward Peters wrote:
> Is there any way to define a field in a table view which triggers a change
> to a value in the row of that table? For example, the Organic Groups list
> view has a 'join link' field which when clicked subscribes the user to that
> group. At present, if I want to change a value, I can have an 'edit' link
> which goes to the form, and then back to the view after saving the change.
> It would be neater to have a one-step action.
>
> Thanks
>
> Edward Peters
> Oxford, UK
> www.iofc.org
You don't want to have a link that triggers a data change. That's in
violation of the HTTP spec as well as a security hole. :-)
However, you could have a link that links to a confirmation page with a
button, and the button triggers a change. That sounds like what you're doing
already.
It *may* be possible (I've not tried) to do some fanciness with the theming of
a given "field" to render a single-button form, and that will be your
join "link". (Style the button to look not like a button.) See the existing
code for edit and delete links for a model and try to extrapolate from there.
I'm not sure if this will work, but it may.
--
Larry Garfield
larry at garfieldtech.com
More information about the support
mailing list