php - Chronoforms field to insert dynamic data -
I need to get a custom element that will see a drop down month and conditionally the numerical month database. For example, if the user selects October, he will keep number 10 in the numerical month of DB in the DB. The month drop down is set to another field in the same database and unfortunately there is no way to combine them for our purposes. Any help would be appreciated. I am new to PHP coding
- In your code,
numeric_month
Enter the PHP code to set in the custom code action> numeric number for the fair value based on the selected drop down value
Field.
In chronoform v4 or v5, this would be something like this:
& lt ;? Php $ form- & gt; Data ['numeric_moth'] = date ("n", stratomet ($ form-> data ['month'])); ? & Gt;
This will set the number of '7' for the month
value of 'July' by numeric_month .
Use change
numeric_month
to set '07' to date ("m", strotomium ($ form-> data ['month ']).
To change one month name to a numbered string for more information about PHP code, see the answers to these questions:
< P>
Comments
Post a Comment