Categories
CMS Mastering Development Wordpress

Multiple Select on Gutenberg Sidebar as metakey

I want to show a multiple select element in the sidebar when editing a page in admin, where I can save the selected values in a metakey. Of course also load the selected values upon load of page-edit in admin. I manage to show the list, but I don’t know how to save it i […]

Categories
CMS Drupal Mastering Development

Drupal 7 creating a form field to upload multiple images

I’m creating a from in a custom Drupal 7 module with a field for multiple images, which isn’t working as expected. As an experiment, I added a custom field to the user acct settings of type image with multiple values. That form displays thumbnails of the uploaded images and has a new "add a new […]

Categories
Mastering Development

How to parse radiobutton value in shiny R

I have a radioButton with conditional panels for each choice as shown below: radioButtons("map_subset",label="enter choices or upload your own subset?", choices=c("enter","upload"),selected="enter"), conditionalPanel("input.map_subset==’enter’", selectizeInput(inputId = "map_enterinput", label = "Select input", choices = NULL, multiple = TRUE, options = list(placeholder = ‘enter names’)) ), conditionalPanel("input.map_subset==’upload’", fileInput(‘map_file’, ‘Choose File Containing IDs\n(one row per ID)’, accept=c(‘text/csv’, ‘text/comma-separated-values,text/plain’, ‘.csv’)) Briefly, […]

Categories
Mastering Development

Is there a way to dynamically selectInput and have its respectivelly textInput arranged like flowLayout?

In the following code the textInput does not stay inside the dashboardSidebar. I would like to have it structured like in 3 columns and the number of rows would depend on the number of items selected using the selectInput. library(shiny) ui <- dashboardPage( skin = "black", title = "Dashboard", dashboardHeader( title = "Dashboard", titleWidth = […]

Categories
CMS Drupal Mastering Development

Remove Selected button not working on files generated using file_save_data in Drupal 8

I am using file_managed field having multiple set to true. I am saving the submitted files in database table in bytea format. buildform : $form[‘test_pdf_1’] = array( ‘#title’ => t(‘Upload Field 1(PDF only)’), ‘#type’ => ‘managed_file’, ‘#multiple’ => TRUE, ‘#upload_validators’ => array(‘file_validate_extensions’ => array(‘pdf’), ‘file_validate_size’ => array(52428800)), ‘#upload_location’ => ‘public://node_files/’, ); submitForm : if(!empty($form_state->getValue(‘test_pdf_1’))){ $test_pdf_1 […]

Categories
CMS Drupal Mastering Development

With Drupal 8/9 managed_file dynamically set fileName and #upload_location

In a form I want to bulk upload jpgs renaming them using exif date information and dynamically setting the #upload_location according to the value of a textfield in the same form. I have no problem with accessing the exif date information. What I don’t know how to do, is dynamically set the file name and […]

Categories
Mastering Development

updateOne with multiple parameter set to true not working in mongodb 3.6.1

We upgraded to a newer db running Mongo 3.6.18 and existing code has stopped working. (After countless hours of soul searching and nail biting…) I have traced it to the following code: $this->st_manager->update_record( [ ‘user_id’ => $driverId, ‘Display_lng’ => $item[‘lng’], ‘Display_lat’ => $item[‘lat’], ], [ ‘$set’ => $update_params, ], [ ‘upsert’ => false, ‘multiple’ => […]

Categories
CMS Magento Mastering Development

Value not saving for a Ui-Select Created in System,.xml

I am Creating a Ui Select in System.xml To show a MultiSelect of category Tree This is how I did this In system,.xml <field id=”apply_for_categories” translate=”label” type=”multiselect” sortOrder=”107″ showInDefault=”1″ showInWebsite=”0″ showInStore=”0″> <label>Apply for Categories</label> <frontend_model>Vendor\Moodule\Block\Adminhtml\Form\Field\Categories</frontend_model> </field> Vendor\Moodule\Block\Adminhtml\Form\Field\Categories.php class Categories extends \Magento\Config\Block\System\Config\Form\Field { /** * @var $template */ protected $_template = ‘Vendor_Module::system/config/ui-select.phtml’; /** * Constructor * […]

Categories
Mastering Development

Send data via ViewData multiselect in ASP.NET Core 3.0 MVC

I’m trying to create multiselect DropDownList, which should load data from the database. All fields should be selected on the first run. I’d like to send back to the controller parameter List<string> selectedStatus, do some logic there and send back to the view by ViewData[“Status”]. Based on this parameter I’d like to fill multiselect DropDownList… […]

Categories
Mastering Development

Ionic Capacitor Fetching in bulk 250 contacts

I am struggling with this for mane days now. It is really frustrating. When I run this code on an IOS device it freezes and in debug console I can see hundreds of lines saying ‘Fetching in bulk 250 contacts’. I tried googling but there is hardly any help. Please let me know what I […]