TYPO3 Powermail: settings.setup.sender.enable.if - typo3

I tried different ways to set sender mail enabled only if a checkbox in the form is activated, but always failed.
1st try:
sender.enable=1
sender.enable.if.isTrue.data=GP:tx_powermail_pi1|field|checkboxfield
2nd try:
[traverse(request.getQueryParams(), 'tx_powermail_pi1/field/checkboxfield') > 0]
3rd try:
sender.enable=CASE
sender.enable.key.data=GP:tx_powermail_pi1|field|checkboxfield
sender.enable.1=1
sender.enable.default=0
4th try:
sender.enable.field=checkbox
Is it possible? What's the right way to do it?
Thank you very much.

This won't work because sender.enable does not accept TypoScript content objects in line https://github.com/einpraegsam/powermail/blob/develop/Configuration/TypoScript/Main/Configuration/04_MailSender.typoscript#L6
I think you have to work with TypoScript conditions to enable or disable it.

Related

SimpleForm select to not include a blank (by default)

To have a select box omit the blank option you can do:
:include_blank => false
In Formtastic, there's a config option that allows you to do this by default:
Formtastic::FormBuilder.include_blank_for_select_by_default = false
Is the a way to configure this in SimpleForm too? I haven't been able to find it in the docs or anything...
Sorry but you can't do this with Simple Form right now. There was a pull request adding this feature but it wasn't merged. If you want to add it to Simple Form pull request is more than welcome.

Line breaks in Zend Navigation Menu labels

I have a need to create a <br/> tag in the display label for a menu item generated using Zend_navigation, but don't seem to be able to find a way to do so.
My navigation item is defined in the XML config as:
<registermachine>
<label>Register your Slitter Rewinder</label>
<controller>service</controller>
<action>register</action>
<route>default</route>
</registermachine>
I want to force a tag in the output HTML between 'your' and 'slitter', such that it appears on two line as below:
Register your
Slitter Rewinder
However, I can't seem to do it. obviously using in the XML breaks parsing, and using html entities means that the lable is displayed as:
Register your <br/>Slitter Rewinder
Has anyone had experience of this that can offer advice?
Thanks in advance!
there is no such option built-in you have to use a partial
$partial = array('menu.phtml', 'default');
$this->navigation()->menu()->setPartial($partial);
echo $this->navigation()->menu()->render();
http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.navigation.menu
you may also try a hack with <label><![CDATA[Menu label<br/>Second line]]></label>
I found a (hacky) solution:
I updated my navigation.xml to use {br} tokens wherever a <br/> tag is required, and then amended the base Zend/View/Helper/Navigation/Menu.php file as follows:
within htmlify function, changed
$this->view->escape($label)
to
str_replace("{br}", "<br/>", $label)
I could (and probably will) override the Zend Library Menu View Helper with my own at some point, but this at least cover it for now.
there is a escapeLabels boolean used to convert html tags and it's true by default.
You can set your navigation like this
$this->navigation()
->menu()
->escapeLabels(false)
->...
http://framework.zend.com/apidoc/2.0/classes/Zend.View.Helper.Navigation.Menu.html#escapeLabels

How do I disable a column using icefaces?

I want to disable a column, I use this code:
<ice-cc:selectBooleanColumn title="Installed" property="installed" disabled="true" ></ice-cc:selectBooleanColumn>
...but the column is still able to change.
Please help :)
By "disabled" you mean it shouldn't appear? Try rendered="false" maybe if this is the case.
There is no disabled attribute in selectBooleanColumn component, as said in API docs. I fear this cannot be done using ice-cc:editableTable.

drupal Webform select list empty first value

I need for my select lists to have a default option of an empty value, or "Select" with no value.
I don't see any mention of how to do this in the documentation.
// $Id: webform.module,v 1.196.2.47 2010/08/16 17:54:19 quicksketch Exp $
You can add the patch webform_select_none_0.patch as mentioned in http://drupal.org/node/563170. Or if you do not have any experience with patches, you can add the following code to the _webform_render_select function in /sites/all/modules/webform/components/select.inc (of course taking into account any disadvantages of manually editing code)
if ($component['extra']['aslist'] && !$component['extra']['multiple'] && ($default_value === '' || !$component['mandatory'])) {
$element['#empty_value'] = '';
}
This will add the - Select - option to mandatory webform select fields when no option is selected
On the webform controls tab (node/%/edit/components/%), all you need to do is uncheck the "Mandatory" checkbox under "Advanced Settings".
Create a custom module and use form alter to modify the output. Explained here: https://www.drupal.org/node/1331956#comment-5876808
I believe you can achieve this with an empty entry in your option list:
|--Choose one--
val1|Value 1
val2|Value 2
val3|Value 3
etcetera.
However, I can't seem to find any sources on this at the moment. Good luck!

Creating Expandable Forms in Microsoft Access 2007

I need to gather some information from a Microsoft Access form and I need everything to be as organized as possible.
There are a lot of columns that can be filled out, but don't necessarily apply to everyone and I want to keep everything as clean as possible.
In a form, is there any way to have certain input boxes displayed only if the user says they have that information?
For example:
Do you have a dog? () yes (o) no
Do you have a dog? (o) yes () no.............Dog name: [_________________________]
The yes's/no's shouldn't be added to the database, but I can dump them somewhere if need be.
Thanks in advance!
Justian
P.S
I'd like to put this on SharePoint as well, so extra brownie points if you can run me through that as well real quick.
Thanks again!
The way I usually handle this is with an option group for the first question, and a disabled text box for the other information, inside the frame of the option group. In the AfterUpdate event of the option group, you set the enabled property of the textbox:
Me!txtDogName.Enabled = (Me!optHasADog = 1)
...assuming that the value of the YES choice is 1.
You'd likely want to set the default value of the option group to the NO choice, and then you'd have the name field disabled by default.
You would also need the OnCurrent event of your form to do the same thing as in the AfterUpdate event.