Fill Drop-down menu of Contact Form 7 with PHP

I want to populate the drop-down menu items of the CF7 from another database. The reason for this is that there might be a large number of items that might dynamically change every week. Adjusting the CF7 manually would be very frustrating.

I have tested the PHP with XYZ PHP Code plugin and it works. The code looks like this

$mydb = new wpdb('User','Password','mytable','localhost');
$rows = $mydb->get_results("SELECT `brand_name` FROM `brands`");
foreach ($rows as $obj) :
   echo ""$obj->brand_name" ";
endforeach;

The result of the script is values in double quotes, as requested by CF7 (Select):

"Taylor" "Line 6" "Kurzweil" "Nord"

Unfortunately, I cannot nest the short code of XYZ PHP Code into another short code of CF7.
This obviously cannot work: (select menu-446 (xyz-ips snippet="brands"))

Is there a way to do this?

Magento 2: What is the Downloads Report in report menu?

enter image description here

Any idea about what is the use of this report?

wp enqueue style – How to load css file in my menu in wordpress

Anyone know how to load css file in my menu in wordpress. use this but it didn’t work

function wmt_theme_style() {
  wp_enqueue_style( 'bootstrap-styles', get_template_directory_uri() . '/css/bootstrap.css', array(), '3.3.4', 'all' );
 
}
add_action( 'wp_enqueue_scripts', 'wmt_theme_style' );

enter image description here

boot – GParted Bringing to No Menu

I’m trying to use GParted, and I’m able to boot properly (resolved this issue). So I put in the USB stick and turn on the computer, and it brings me straight to the GParted program, but after pressing enter on the first option, it brings me to the same screen, but with no choices. It still keeps the same background picture (with the many CDs), but there is no menu and options. Any idea why this is? Did I get the wrong type of “iso” file (I have the i686 version)? I wasn’t sure what the type meant.

c# – DropDownList para el menú Create,

Quisiera saber que tengo que cambiar actualmente en mi modelo, vista y/o controlador para poder ver los datos a través de un dropdownlist de Organos y Puestos en lugar de solicituar el id de estos.
aquí les dejo mi controlador, la vista y el modelo que tengo para el tipo de edit que tengo actualmente.

Esta es la parte del código en mi controlador en el cual estoy manejando el get y el post para el edit

public ActionResult Editar(int Id)
    {
        EditEmpleadosViewModel model = new EditEmpleadosViewModel();
        using (var db = new sir_cjfEntities())
        {
            var oUser = db.empleados.Find(Id);
            model.Nombre = oUser.nombre;
            model.ApPaterno = oUser.ap_paterno;
            model.ApMaterno = oUser.ap_materno;
            model.Organo = oUser.id_organo;
            model.Puesto = oUser.id_puesto;
            model.ID = oUser.id_empleado;
            model.ID = oUser.id_empleado;
        }
        return View(model);
    }
    (HttpPost)
    public ActionResult Editar(EditEmpleadosViewModel model)
    {
        if (!ModelState.IsValid)
        {
            return View(model);
        }
        using (var db = new sir_cjfEntities())
        {
            var oUser = db.empleados.Find(model.ID);
            oUser.nombre = model.Nombre;
            oUser.ap_paterno = model.ApPaterno;
            oUser.ap_materno = model.ApMaterno;
            oUser.id_organo = model.Organo;
            oUser.id_puesto = model.Puesto;

            if (model.Password != null && model.Password.Trim() != "")
            {
                oUser.contrasena = model.Password;
            }
            db.Entry(oUser).State = System.Data.Entity.EntityState.Modified;
            db.SaveChanges();
        }

        return Redirect(Url.Content("~/User/"));
    }

Mi modelo esta solicitando en los capos de Órgano y Puesto los int “ya que son las FK” pero supongo que tendria que cambiarlas a string porque lo que quiero llegar a pedir es el nombre del estos a traves del id

public class EditEmpleadosViewModel
{
    public int ID { get; set; }

    (Required)
    (StringLength(25, MinimumLength = 1))
    (Display(Name = "Nombre"))
    public string Nombre { get; set; }

    (Required)
    (StringLength(25, MinimumLength = 1))
    (Display(Name = "Apellido paterno"))
    public string ApPaterno { get; set; }

    (Required)
    (StringLength(25, MinimumLength = 1))
    (Display(Name = "Apellido Materno"))
    public string ApMaterno { get; set; }

    (Required)
    public int Organo { get; set; };
    (Required)
    public int Puesto { get; set; };

    (Required)
    (StringLength(25, MinimumLength = 1))
    (Display(Name = "Nombre de Usuario"))
    public string Usuario { get; set; }

    (Display(Name = "Contraseña"))
    (StringLength(25, ErrorMessage = "La {0} debe de contener al menos {2} caracteres", MinimumLength = 5))
    /*(RegularExpression(@"(?=.*W)?(?=.*d)", ErrorMessage = "Debe de Contener al menos "))*/
    (DataType(DataType.Password))
    public string Password { get; set; }

    (Display(Name = "Confirmar Contraseña"))
    (Compare("Password", ErrorMessage = "La contraseñas no coinciden"))
    public string ConfirmPassword { get; set; }
}

Intente cambiar @Html.TextBoxFor(d => d.Organo, new { @class = “form-control” }) por @html.DropDownListFor pero no se si solo haciendo esto baste para coneguir lo que quisiera.

@model SistemadeInformaciónRegional.Models.ViewModels.EditEmpleadosViewModel
@{
    ViewBag.Title = "Edición de Usuarios";
}

<h2>@ViewBag.Title</h2>

<div class="row">
    <div class="col-md-12">

        @using (Html.BeginForm("Editar", "CEmpleados", FormMethod.Post, new { }))
        {
            @Html.HiddenFor(d => d.ID)
            @Html.AntiForgeryToken()
            @Html.ValidationMessage("Error", new { @class = "text-danger" })

            @Html.LabelFor(d => d.Nombre)
            @Html.TextBoxFor(d => d.Nombre, new { @class = "form-control" })
            @Html.ValidationMessage("Nombre", new { @class = "text-danger" })
            <br />
            @Html.LabelFor(d => d.ApPaterno)
            @Html.TextBoxFor(d => d.ApPaterno, new { @class = "form-control" })
            @Html.ValidationMessage("ApPaterno", new { @class = "text-danger" })
            <br />
            @Html.LabelFor(d => d.ApMaterno)
            @Html.TextBoxFor(d => d.ApMaterno, new { @class = "form-control" })
            @Html.ValidationMessage("ApMaterno", new { @class = "text-danger" })
            <br />
            @Html.LabelFor(d => d.Organo)
            @Html.TextBoxFor(d => d.Organo, new { @class = "form-control" })
            @Html.ValidationMessage("Órgano o Área", new { @class = "text-danger" })
            <br />
            @Html.LabelFor(d => d.Puesto)
            @Html.TextBoxFor(d => d.Puesto, new { @class = "form-control" })
            @Html.ValidationMessage("Puesto", new { @class = "text-danger" })
            <br />
            @Html.LabelFor(d => d.Usuario)
            @Html.TextBoxFor(d => d.Usuario, new { @class = "form-control" })
            @Html.ValidationMessage("Usuario", new { @class = "text-danger" })
            <br />
            @Html.LabelFor(d => d.Password)
            @Html.PasswordFor(d => d.Password, new { @class = "form-control" })
            @Html.ValidationMessage("Password", new { @class = "text-danger" })
            <br />
            @Html.LabelFor(d => d.ConfirmPassword)
            @Html.PasswordFor(d => d.ConfirmPassword, new { @class = "form-control" })
            @Html.ValidationMessage("ConfirmPassword", new { @class = "text-danger" })
            <br />
            <div style="text-align:right;">
                <input type="submit" class="btn btn-success" value="Aplicar Edición" />
            </div>
        }
    </div>
</div>

forms – How to load custom menu field when editing?

I’m extremely new to Drupal so if my question is badly worded I’m sorry. Inside my menu_ui_override.module I have made a made a new field and added a custom submit handler:

function menu_ui_override_form_menu_edit_form_alter(&$form, DrupalCoreFormFormStateInterface $form_state, $form_id) {
  $form('menu_header') = array(
    '#type' => 'textfield',
    '#title' => t('Menu header'),
    '#weight' => '0',
    '#required' => FALSE,
  );

  $form('actions')('submit')('#submit')() = 'menu_ui_override_accept_menu_header_submit';
}

function menu_ui_override_accept_menu_header_submit(&$form, DrupalCoreFormFormStateInterface $form_state) {
  $values = array(
        'menu_header' => $form_state->getValue('menu_header'),
  );
  
  $connection = Drupal::database();

  $connection->update('menu_tree')
  ->fields(array(
    'menu_header' => $values('menu_header'),
  ))
  ->execute();
    
  drupal_set_message(t('Saved'));
}

This seems to save my new field but now I’m not sure how to load the data entered into that field when I go back to edit the menu after saving it. I’m also not sure where to put the logic for this part. Any help would be greatly appreciated!

Superfish menu hides second level in responsive viewport

I have migrated dev.ronrandolph.com from Drupal 7 to 8.9.1 with Danland theme and superfish menu. It looks ok on a desktop browser but when in a responsive viewport the second level menu items appear behind the first levelenter image description here. I might not be understanding all of the rules of z-index so any observation welcomed

partitioning – MSI GE66 – Grub menu not showing after install (dual boot)

just installed kubuntu 20.04 on my MSI GE66 Raider laptop with dual boot.

The bootloades should be installed in:

/dev/nvme0n1

Other available options are:

/dev/nvme01p3
/dev/nvme01p4
/dev/nvme01p6

The installation process goes on without any error and it seems it is installing the GRUB in the right partition but as I reboot my machine, it goes straight in Windows 10.

What can I do to fix this?

I have already disabled Secure Boot.

Thanks
Fabio

6 – Views page menu shows up on all languages

I am working on a old website built on Drupal 6 which has two languages. There is a views on which I created a page for each language, but their menus shows up on both languages. I tried different combinations of relationships, arguments and filters, which works on the content but not on the menus. How can I force a views page menu to display only on the correct language?

Views page menu shows up on all languages on Drupal 6

I am working on a old website built on Drupal 6 which has two languages. There is a views on which I created a page for each language, but their menus shows up on both languages. I tried different combinations of relationships, arguments and filters, which works on the content but not on the menus. How can I force a views page menu to display only on the correct language?