I have question regarding the backend. I'm developing on Typo3 10.4, but also 9.5 and 11.5 so it doesn't really matter which version I'm using.
I created a new --div-- in the page config form and added a selectSingle inputElement.
The select's foreign_table is set to be_users.
It only shows the username of the backend user. Is there a way to also output the realName of each user shown in the list?
The only way I found to do so is to override the be_users.php and force alternative labels.
But I wonder if there is a way by telling the inputElement to get more than just the username. Like an "additional_fields" line in the 'config' part of the TCA.
Any ideas?
Related
In the simplesaml_auth module basic settings, there is a way to specify which sp to use as an authentication source as shown in the image below
Instead of having to populate this field every time, I want to have it dynamically populated this according to an environment variable. How can that be done?
Context: Joomla 3.4, XML file params changes.
I need to be able to trigger / activate a PHP script whenever a particular param field list change takes place.
This has nothing to do with the standard PHP script activations e.g. initialisation, after installation etc.
I want this PHP script to be triggered each time a change in a list setting occurs.
I have searched the various forums - but without any success.
Any help on this matter will be really appreciated.
In response to:
Who is going to make the change? the developer? the user? some other script?
Where is that change happening? Inside a database table or on file level?
The change is simply a param change in the admin backend of the module. (Usually such a param is under the Basic or Advanced categories. When a user in the backend makes a change to a list item, or to a field entry.
Since posting this message, it seems to me that I need to try and make use of an event 'onExtensionBeforeSave' which - as I understand it, should be triggered each time a param is saved.
I should then be able to build a plugin that can respond to that event.
I am busy trying to implement such a plugin (and supporting xml file) at present.
Alastair
How do I fill out my drupal webform automatically, I have 500 entries to fill out and I can't do it one by one. I try to fill it out automatically directly to phpmyadmin in drupal Database but it doesn't work beacause drupal add more fields in his database (in webform_ submitted_data) so I think it's possible to use a script or use a module to fill it out but I don't know how
The best module to do it, it's webform import very helpful
Allows delimited data files to be imported as submission (results) into webforms.
This is useful for importing submissions from other systems in to Webform. Can also be used to Edit submissions via Export / Import as long as the CSV has the SID column filled.
You can use drupal_form_submit() to submit a webform. See this answer over at drupal.stackexchange.com for instructions.
When you've got that working, it should just be a matter of looping over the webforms you want to fill in.
There is a sandbox module for that: Webform Autofill. But I 've never used it so I can be sure it works.
If you have never used a sandbox module you can see more details at the drupal sandbox modules documentation.
Need help of Drupal experts.
My purpose (with Drupal 7 and Ubercart 3 in hands) is to add a custom field to the Checkout page, that should be dynamic (values from ajax request) and it content depends on user's delivery city input.
With "Extra Fields Pane" module I've successfully created field with some placeholder value. Than, I use JS methods to append values to that field. The problem has appeared when I submit form with that dynamic-added selected value - I have an "invalid selection" error for that field. When non-added-by-js value (placeholder) selected - everything works as expected.
Can you please hint me solution to that problem?
I found one here https://stackoverflow.com/a/5159013/837255 and it seems to be a common approach, but here other issue begins.
In %my module% in a hook I can't access field to do manipulations on it.
Example of how I need to make changes in created by module 'ajax_field_name':
$form['panes']['delivery']['ajax_field_name']['#ajax'] = ....
But my *cking pane has no any $form['panes']['delivery']['ajax_field_name']. When I do var_dump($form['panes']['delivery']) I see that 'ajax_field_name' located somewhere in $form['panes']['delivery']['address']['#uc_addresses_address'] OBJECT behind a private property.
function uc_nova_poshta_form_alter(&$form, &$form_state, $form_id){
if ($form_id == 'uc_cart_checkout_form'){
$obj = $form['panes']['delivery']['address']['#uc_addresses_address'];
// addressBook is a private property
$obj->addressBook;
}
}
In fact, this code does what I need -
$form['panes']['delivery']['address']['ajax_field_name2'] = array(
'#type' => 'select',
...
}
creates a custom field, in a right place, with access to it, BUT only in that form and this field does not affect any further activity (order review, admin pages, etc.). Also in $form['panes']['delivery'] this field ('ajax_field_name2') is located separately from created with module 'ajax_field_name'.
I guess the reason of this behavior are some modules e.g. uc_addresses (am I right?), but even when I disabled most suspicious of them - the problem is still there.
Is there a possibility to find out how to get access to 'ajax_field_name' created field?
Thank you.
This may not completely solve your problem (if you still have it as this seems a rather old question...), but one problem is you are using the wrong hooks. You should use hook_uc_checkout_pane_alter and target uc_checkout_pane_delivery to accomplish this. I learned this the hard way trying to set the default country selected to something other than US; things will break badly if you manipulate them via hook_form_alter and it's variants.
I'm working through something similar right now. I will update this answer with further information as I uncover it.
I've been searching for quite a while now and still wasn't able to find an answer yet.
I'm using Drupal 7.4 and I created a new content type. There i want to add a simple text field that has a Default value where I can add PHP. Normally, the Default value shows only plain text.
To be more specific:
For the users I defined a field_city that they must complete when they sign up.
So for example i would have a user "john" from "Bucharest".
I need to assign the value of field_city - namely Bucharest - to the default value of the text field via PHP (I know how to do this part).
So when john adds new content, he would already have Bucharest printed in that text field but still be able to write whatever other city there.
How could I achieve this?
Can I get away without making a custom module?
Thanx.
Are you using the CCK module for Drupal 7? Although it is still in development status, it will do the trick.