title: React Admin: Dynamic SuccessMessage in Create/Edit Views
body: <p>I am using the <code>react-admin</code> framework, and trying to send a dynamic <code>successMessage</code> from the <code>Create/Edit</code> views based on the value of a child input in the parent view's <code>SimpleForm</code>. </p>
  
  <p>Right now <code>GetSuccessMsg()</code> is called once on render and is only passing the initial value to the notifications panel. Here's my current code.<br/></p>
  
  <pre><code>export const UserCreation = ({ userId, timezone, ...props }) =&gt; {
    var SuccessMsg = "Account Created. Email sent to complete account setup."
    const ValidateUserCreation = (values) =&gt; {
      SuccessMsg = values 
        ? "Account Created. Email sent to complete account setup." 
        : "Account Created"
      return undefined
    };
  
    const GetSuccessMsg = () =&gt; { return SuccessMsg }
  
    return (
      &lt;Create {...props} successMessage={GetSuccessMsg()}&gt;
        &lt;SimpleForm toolbar={&lt;WithPracticeToolbar many /&gt;}&gt;
          &lt;TextInput source="name" /&gt;
          &lt;TextInput source="phone" /&gt;
          &lt;TextInput source="email" /&gt;
          &lt;TimezoneDropDown source="timezone" /&gt;
          &lt;BooleanInput
            validate={ValidateUserCreation}
            label="Create login account for this member"
            source="createMemberLogin"
            defaultValue
          /&gt;
        &lt;/SimpleForm&gt;
       &lt;/Create&gt;
     )
  };
  </code></pre>
  
  <p>I am looking for any reasonable way to UPDATE the <code>successMessage</code> prop (passed to the <code>Create</code>) when the child input is changed. </p>
  
  <p>Thanks in advance for the help!</p>