is it possible in symfony 1.4 to pass options to the embedded i18n forms?

I have a Template model which is i18n and has a TemplateForm and a TemplateTranslationForm. I embed the translation form with:

$this->embedI18n(array($this->getOption('edit_lang')));

My problem is that if the field is_html is checked in the main TemplateForm, than the embedded form validator should be aware of that and will not strip down html tags from the body of the Template. But I cannot pass options from the main form to the i18n one, thus I don't know how to implement it. Any idea?

This is my schema:

Template:
  actAs:
    Timestampable: ~
    I18n:
      fields: [body, subject]
  connection: master
  tableName: template
  columns:
    is_html: boolean
    subject: string(150)
    body: clob
    label: string(30)
MailTemplate:
  inheritance:
    extends: Template
    type: column_aggregation
    keyField: type
    keyValue: 1
PageTemplate:
  inheritance:
    extends: Template
    type: column_aggregation
    keyField: type
    keyValue: 2
DocumentTemplate:
  inheritance:
    extends: Template
    type: column_aggregation
    keyField: type
    keyValue: 3

Answers


embedI18n is just a wrapper around embedForm. If you need to pass additional options to the embedded form, use embedForm() instead.

Have a look at sfFormDoctrine::embedI18n() to understand what it exactly does.


Need Your Help

MSSQL.so for PHP 5.3 not loading (CentOS 5.8)

php sql-server make centos5 freetds

I'm trying to install the mssql module for PHP on a server running CentOS 5.8 and PHP 5.3.5. I was able to get it working on the dev server which runs CentOS 5.2 and PHP 5.2.6, and everything seems...

How do I compile and run a program in Java on my Mac?

java osx compilation

How do I compile and run a program in Java on my mac?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.