1

I created a new content type and added a text field. While creating the text field I am given three options for the widget type: Server Side Only, Hidden Field, and Text Field. The "Server Side Only" and "Hidden Field" come from the Hidden Field module. Can someone explain when Server Side Only would be used?

2
  • It would be a good idea to include which module adds this option as it's not a part of drupal core.
    – googletorp
    Commented Feb 7, 2012 at 17:23
  • Sorry. I wasn't aware that this wasn't a part of drupal core. My drupal novice badge is shining bright :-x I've updated the question.
    – lkiss80
    Commented Feb 9, 2012 at 20:09

1 Answer 1

0

I can't find any reference on Google to a widget that provides this type of functionality so I can only assume it's something custom, but I think the reasoning for it would be the same regardless:

When using the Drupal form API you can add an element of type value which keeps that element server-side only...i.e. the value is available to the form submission/validation functions but it not exposed to the user. A hidden field would still be exposed in the form's HTML so could theoretically be changed by the user before the form is submitted.

I would guess in this case it applies to the node edit form, each node would essentially have a non-editable field with a constant value. I'm not actually sure how useful this would be in normal life but I guess if every node had to have, for example, a geo-location map associated with it, and the value of that location field had to remain constant, this would do it. The same map would just be outputted on each node.

To be honest that could all be nonsense though, it's just an educated guess :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.