I have a redux-form component which gets initialValues from the redux store in the first load and populates the form. The form is still not submitted. (it was submitted previously but we are in new state from scratch after a user browser reload). The initial Values are populated properly.
let CheckoutStep1Form = (props) => {
return(
//my fancy form
)
}
CheckoutStep1Form = reduxForm({
form: 'step1', // a unique name for this form
})(CheckoutStep1Form);
CheckoutStep1Form = connect(
state => ({
initialValues: {
//my initial values
}
})
)(CheckoutStep1Form)
Besides this I have another component which is aiming to summarise all the form information provided in previous steps in a plain view.
const CheckoutStep1Summary = ({values}) => {
return(
//my fancy summarize view
)
}
export default connect(
state => ({
values: getFormValues('step1')(state)
})
)(CheckoutStep1Summary)
Problem: getFormValues('step1')(state)
returns empty. No values in the form due not submitted.
So the question is: Can I get the form Values from a form that it was not already submitted in some way using redux-form?
Of course I could do some workaround as I have the values in the state but I would like to know if redux-form is taking in consideration this scenario.