Closed (fixed)
Project:
Variable
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Oct 2011 at 22:52 UTC
Updated:
23 Feb 2012 at 12:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
nlambert commented+1
Comment #2
adam1 commented+1
Comment #3
cyberwolf commentedWe've built a module which adds a text_format variable type. Please find it attached.
It has to use an ugly form_alter though to solve the #format problem.
Credits to HnLn (http://drupal.org/user/312837) for providing some initial code for this.
Comment #4
cyberwolf commentedI was able to replace the hook_form_FORM_ID_alter() implementation with an element callback.
Also added a default callback.
Any chance the variable module wants to adopt this code? Then I'll provide a patch.
Comment #5
rfayI can't speak for the maintainers, but would very much appreciate a patch... and would be surprised if the maintainers didn't want one.
Comment #6
cyberwolf commentedAttached is a patch for the variable module.
Comment #7
guillaumev commentedI just tested this and it's working fine... RTBC ?
Comment #8
guillaumev commentedHere is an updated patch with the possibility for users to set default values for their text_format variables (see default value callback)
Comment #9
jose reyero commentedNice!
Committed, thanks.
Comment #10
cyberwolf commentedGreat to see this getting in. Thanks guys!