Suporte » Outros assuntos » Soma de resultados “Meta box”

  • Preciso de uma ajuda para fazer três campos Metabox(array) diferente efetuar a soma e no quarto metabox mostre o total dos três campos segue abaixo o código.

    array(
    ‘id’ => ‘renda1’, // Obrigatório
    ‘label’ => __( ‘Renda R$:’, ‘odin’ ), // Obrigatório
    ‘type’ => ‘input’, // Obrigatório
    ‘default’ => ”, // Opcional (deve ser o id de uma imagem em mídias, separe os
    ids com virtula)
    ‘description’ => __( ‘Somente números inteiros’, ‘odin’ ), // Opcional
    ‘attributes’ => array( // Optional (html input elements)
    ‘type’ => ‘number’,
    ‘max’ => 99999,
    ‘min’ => 0
    )
    ),

    array(
    ‘id’ => ‘renda3’, // Obrigatório
    ‘label’ => __( ‘Renda R$:’, ‘odin’ ), // Obrigatório
    ‘type’ => ‘input’, // Obrigatório
    ‘default’ => ”, // Opcional (deve ser o id de uma imagem em mídias, separe os
    ids com virtula)
    ‘description’ => __( ‘Somente números inteiros’, ‘odin’ ), // Opcional
    ‘attributes’ => array( // Optional (html input elements)
    ‘type’ => ‘number’,
    ‘max’ => 99999,
    ‘min’ => 0
    )
    ),

    array(
    ‘id’ => ‘renda3’, // Obrigatório
    ‘label’ => __( ‘Renda R$:’, ‘odin’ ), // Obrigatório
    ‘type’ => ‘input’, // Obrigatório
    ‘default’ => ”, // Opcional (deve ser o id de uma imagem em mídias, separe os
    ids com virtula)
    ‘description’ => __( ‘Somente números inteiros’, ‘odin’ ), // Opcional
    ‘attributes’ => array( // Optional (html input elements)
    ‘type’ => ‘number’,
    ‘max’ => 99999,
    ‘min’ => 0
    )
    ),
    array(
    ‘id’ => ‘total’, // Obrigatório
    ‘label’ => __( ‘Renda R$:’, ‘odin’ ), // Obrigatório
    ‘type’ => ‘input’, // Obrigatório
    ‘default’ => ”, // Opcional (deve ser o id de uma imagem em mídias, separe os
    ids com virtula)
    ‘description’ => __( ‘Somente números inteiros’, ‘odin’ ), // Opcional
    ‘attributes’ => array( // Optional (html input elements)
    ‘type’ => ‘number’,
    ‘max’ => 99999,
    ‘min’ => 0
    )
    ),

Visualizando 2 respostas - 1 até 2 (de um total de 2)
Visualizando 2 respostas - 1 até 2 (de um total de 2)
  • O tópico ‘Soma de resultados “Meta box”’ está fechado para novas respostas.