fix(client):format url values on form submit
This commit is contained in:
@@ -2,7 +2,12 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { reduxForm } from 'redux-form';
|
||||
|
||||
import { FormFields, BlockSaveButton, BlockSaveWrapper } from './';
|
||||
import {
|
||||
FormFields,
|
||||
BlockSaveButton,
|
||||
BlockSaveWrapper,
|
||||
formatUrlValues
|
||||
} from './';
|
||||
|
||||
const propTypes = {
|
||||
buttonText: PropTypes.string,
|
||||
@@ -48,7 +53,9 @@ export function DynamicForm({
|
||||
return (
|
||||
<form
|
||||
id={`dynamic-${id}`}
|
||||
onSubmit={handleSubmit(submit)}
|
||||
onSubmit={handleSubmit((values, ...args) =>
|
||||
submit(formatUrlValues(values, options), ...args)
|
||||
)}
|
||||
style={{ width: '100%' }}
|
||||
>
|
||||
<FormFields
|
||||
|
Reference in New Issue
Block a user