Questions tagged [mobx-react-form]

17 questions
4
votes
1 answer

mobx-react-form textfield default value not recognized on submit

The code is as follows The form setup is as follows { name: "phone", fields: [ { name: "countryCode", label: "Country Code:", …
prajeesh
  • 2,202
  • 6
  • 34
  • 59
3
votes
3 answers

Create custom style Material UI with redux-form

When creating custom styling with Material UI + redux-form, the Field element from redux-form does not apply the custom class names. When simply using FieldText from Material UI does. I have commented out the non-functioning line of code below. The…
angelica
  • 55
  • 4
2
votes
1 answer

Redux Forms - Ignore initialValues with no registered field

I have an object fetched from the server that contains lots of fields not relevant to the current form. I'd like to pass the whole object to initialValues on my form, but when I submit, I don't want the extra fields to carry through. Here's a…
Mike
  • 1,625
  • 3
  • 16
  • 19
2
votes
1 answer

How to bind mobx-react-form with mobx-state-tree store

I have a form with three fields A, B and C. I am using mobx-react-form to handle the fields because it comes with onChange updates and validation baked in. I have set this up and it's working fine when I log out the values. const View =…
tea
  • 568
  • 2
  • 10
  • 18
1
vote
0 answers

Translating form labels inside json with i18n (react)

I'm using i18n(v9) to translate a lot of text in a big react project. It's working as intended in cases like:
1
vote
1 answer

Unable to submit form in Model react

I have a model file in which I want to submit form but I am not able to trigger submit function my file is like import React, { useState, useEffect } from "react"; import InputField from "./InputField"; import Button from "./Button"; import axios…
gamer
  • 603
  • 4
  • 20
1
vote
1 answer

How to display data from Mob-x store on click

I have this component: import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import PropTypes from 'prop-types'; import './cardCheck.css'; @inject('auto') @observer class CardCheck extends Component { render()…
Peter Johnson
  • 39
  • 1
  • 3
0
votes
1 answer

Set form values with mobx-react-form using object/props

I'm using mobx-react-form and I need to fill a form with default values pulled from an object in my store. Unfortunately, if I try to use FormModel.$("email").set(object.email); inside my component mobx complains that I can't modify observed…
Peter Gerdes
  • 2,288
  • 1
  • 20
  • 28
0
votes
1 answer

Error: The selected field is not defined (email)

I am trying to learn mobx-react-form and the validation part. I want a simple validation on email and also I want to do it with mobx-react-form. Given below is my code const formFields = { email: { type: 'text', placeholder: 'Your Email…
Aezaz Ali
  • 15
  • 5
0
votes
1 answer

Angular Material (8) Error Message (from Validator) being displayed when Page reloaded

I am new to Angular Material. I am working on a Registration form using Angular Material (8). When doing so, I am seeing that the Error Message is displayed when the page is Reloaded (by hitting the "Refresh" Button on the browser). The field is…
Casey Harrils
  • 2,793
  • 12
  • 52
  • 93
0
votes
1 answer

Angular Material (8) Validations return strange texts

I am working on a Request form using Angular Material (8). I am trying to write proper Validators and Error Messages for each of the fields on the form. As of now, I am getting the following errors associated with the fields. Why is this going on…
Casey Harrils
  • 2,793
  • 12
  • 52
  • 93
0
votes
1 answer

Not changing values of form reactjs

I have a form in which I am generating form fields dynamically . Now Issue is fields which are not dynamically generated are getting input and those field which are dynamically generated are not taking input in fields. name='name' and name='age' …
gamer
  • 603
  • 4
  • 20
0
votes
1 answer

Trying to use mobX to replace setState

Trying to replace setState in react. Having issues changing value of this.info using observable in mobX. When I console.log(e.target.name, e.target.value) the value only returns one letter. //Login import * as React from 'react'; import {…
KamSami
  • 387
  • 1
  • 4
  • 14
0
votes
1 answer

Making a one time API call by removing the map function

I am new to ReactJs and I am having difficulties understanding below change. When a form is submitted, the below code makes call to API based on number of item present. I have decided not to use map function but with a single call by removing map. …
Rocker rock
  • 155
  • 2
  • 11
0
votes
1 answer

Mobx react form add fields on click depending on condition

I have a function that generates fields for a form like so: export const makeFields: Function = (itemData: Object) => { return [ { // PROJECT DETAIL SECTION name: 'chooseAccount', label: 'Choose Account', …
Aessandro
  • 5,517
  • 21
  • 66
  • 139
1
2