Doh!!! Nevermind.  Being stoopid when applying the $ui->htmldata->raw
setting to my actual code.

It's been a long day.

Thanks for your help Owen.


On Sat, Apr 18, 2009 at 3:41 PM, Colin <[email protected]> wrote:
> On further inspection, it's not Options::set() I need to get to work,
> but actually the $ui to pass the raw unprocessed HTML to the callback
> function.
>
> It appears the htmldata is getting processed before it's passed to the
> callback function.
>
>
>
>
> On Sat, Apr 18, 2009 at 3:34 PM, Colin <[email protected]> wrote:
>> Thanks for the quick reply Own. Works a treat.  Thanks.
>>
>> Now how do I get Options::set() to do the same thing?
>>
>> In my actual plugin, I use $ui->on_success() to process the form data
>> and then use Options::set() to save the options.
>>
>> Adding the  $ui->htmldata->raw = true; to my form line doesn't seem to
>> have an effect when I save the options via Options::set().
>>
>> Cheers,
>> Colin
>>
>>
>> On Sat, Apr 18, 2009 at 3:17 PM, Owen Winkler <[email protected]> wrote:
>>>
>>> Colin wrote:
>>>>
>>>> Is this another bug in the way InputFilter is handling the tags or am
>>>> I missing something really obvious here?
>>>
>>> Form controls filter HTML input by default.  Try this:
>>>
>>> $ui = new FormUI( strtolower( get_class( $this ) ) );
>>> $ui->append( 'textarea', 'htmldata, 'options:foo__html', _t( 'HTML Code') );
>>>
>>> $ui->htmldata->raw = true;
>>>
>>> $ui->append( 'submit', 'save', _t( 'Save Options' ) );
>>> $ui->set_option( 'success_message', _t( 'Options successfully saved.'));
>>> $ui->out();
>>>
>>>
>>> Owen
>>>
>>> >>>
>>>
>>
>>
>>
>> --
>> Colin Seymour
>> Blog: http://www.colinseymour.co.uk
>> Tech Stuff: http://www.lildude.co.uk
>>
>
>
>
> --
> Colin Seymour
> Blog: http://www.colinseymour.co.uk
> Tech Stuff: http://www.lildude.co.uk
>



-- 
Colin Seymour
Blog: http://www.colinseymour.co.uk
Tech Stuff: http://www.lildude.co.uk

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to