Search Results

Search found 2 results on 1 pages for 'hongkildong'.

Page 1/1 | 1 

  • Can't get custom error rendering to work in symfony 1.4

    - by hongkildong
    I'm tring to customize error rendering in my form according to this example. Here is my code: if ($this['message']->hasError()) { $error_msg = '<ul>'; foreach ($this['message']->getError() as $error) $error_msg .= "<li>$error</li>"; $error_msg .= '</ul>'; } return $error_msg; but when $this['message'] has error this code returns '<ul></ul>' so it seems foreach ($this['message']->getError() as $error) causes no iterations $this['message']->getError() returns sfValidatorError object - maybe something changed in symfony 1.4 and it isn't iterable anymore... At first I thought that all magic in that example happened because of object being placed in $error by iteration implements __toString() but it seems no iterations happens at all...

    Read the article

  • How to click TinyMCE toolbar's button programmatically ?

    - by hongkildong
    I want to make preview button as usual form button next to submit button(as it made in most cases of "Post new topic" forms). How can I programmatically simulate toolbar's preview button click ? I tried $('#article_body_preview').click() but it didn't work. (I use jQuery lib and #article_body_preview is toolbar's preview button element )

    Read the article

1