Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

236
Visualizações
In CI3, How do you pass js edited textbox input value from view to controller?

I've been trying to pass textbox input value

<input type="text" class="form-control" name="XField" id="XField" placeholder="X">

that was edited via javascript like document.getElementById("XField").value = '1' to the controller by calling $this->input->post('XField') or even using $_POST, but it wont return anything. it's like $this->input->post('XField') will only get the user inputted value, not the manually edited value via js because all my other textbox input value that was inputted by user got properly extracted by $this->input->post('XField') or $_POST. I also already tried using $('#XField').val(1) but still wont get me anything.

So, How do i get the manually defined/edited value of input textbox from the view to the controller?or how do i manually define/edit the textbox value as if it was coming from the user(if my assumption is true that input post wont catch manually edited value)?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda