I am creating a new module and in that module I add a form which has a field name content in the database.
Now when I add a wyswig editor in this form with the field name content in the database, the layout of the form in the backend changes completely as compared to default layout.
But when I changed the database field name from content to any other name lets say content_html or content_h etc etc., the layout of the form now appeared as a default form.
This happens only when I use wyswig editor, and without wyswig if I create simple form it accepts the values in the database under the content field name.
Why can't magento accept the content as a field name, using wyswig editor.
the problem is that magento sets the id of the element to same as the name and the id
content is already present:
<div class="main-col" id="content">
try to set a prefix to your for your form
$form->setHtmlIdPrefix('something_')
that should fix it
Related
I use Typo3 10LTS with the default form extension. I want to select the receiver of the form based on a value in a hidden field.
But of course the hidden field doesn't contain the real email address but only a key value.
Thanks,
Stephan
Seems to be possible via dynamically set finisher values based on formValues conditions
Using flux to create custom content elements for TYPO3, fields that are defined in a flux:form are stored in a flex field as XML by default. By the solution Claus Due pointed out here (Fluidtypo3 Flux - save in table field), they can also be stored as individual columns in tt_content.
Now, when creating page templates and defining template parameters as flux input fields, could those be stored as indiviual columns in the "pages" table?
The obvious approach to do this in the same way as described for content elements, i.e.:
<flux:field.text name="pages.extrafield" label="Content" />
did not work. (I created the field "extrafield" in the pages table using my extension's ext_tables.sql)
The format you used is the correct one, but in order to get the field saved it first must be 1) allowed for the user who saves and 2) shown somewhere in the form; types passthrough and none should also work.
The last requirement is a safeguard added in a recent major version and is there to prevent doing things that normally would be prohibited by access settings or field availability.
I'm trying to develop a frontend extensions with typo3 - fluidcontent. Is it possible to use the bodytext field of the tt_content table instead of the flexform field?
I would like to connect this text element with the tt_content.bodytext field.
<flux:field.text name="bodytext" label="Content" />
You can force Flux to save to the record itself, rather than the flexform field, by prefixing your field names with the name of the table that your form applies to. For example, since this implementation is for tt_content, you can name the field tt_content.bodytext and the value will be saved to that field instead.
I want to add a form text component multiple times in a page and give different id's to them in CQ5.
The default form text component doesn't provide option to specify an id, rather it generates one itself.
The id that is generated is the formId_elementName, where formId is the id of the form which is present in the form start component(defaults to "new_form") and the elementName is the value that is provided in the Element Name field of the form text component.
But, in case you would like to provide the authors, the ability to add their own id's to the form start component, then one possible way would be to override the default form text component.
Add an additional field to the dialog box of the form text component called id and use that value in the jsp as id for the input field. But be cautious when providing this functionality, as the authors may forget to update the id fields appropriately, there by resulting in many text fields having the same id.
How can I populate the form when the page is loaded
I have tried an query base form, and a automatic fetch, but neither will display any data when the page loads.
You must create "Automated Row Fetch" process on the page. For each item on page change the "Source Type" to "Database column", and enter column name in "Source value or expression".
When using the page wizard to create a query based form, the query given in the wizard is only used to define the fields on the form and create the corresponding page items. It is not used to subsequently populate data.
For that you need to add a process in a region above/before your form. Make the process PL/SQL type and provide your query there. Assuming your form is on page 2 and has fields ID and Name, use:
select name into :P2_NAME from my_table where id = :P2_ID;
The page or link that calls page 2 will need to set the value for P2_ID.