This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
Populating State Field
Started 14 years ago by MarioCipriano | 4 posts |
-
I would like to pre-populate the state field.
Posted 14 years ago # -
How you will populate the field ? is it by your form url? for exmaple when a user access the form with this url :
http://www.yourdomain.com/machform/view.php?id=2&state=ABC
then state field would be filled with "ABC". If so, you can try to use the method that posted in here :
http://www.appnitro.com/forums/topic/dynamic-content-php?replies=25#post-4445
MachForm Support
Posted 14 years ago # -
No, I am would like to set it in the HTML code or using CSS. I am not attempting to fill the field via the URL. I would also like to remove country.
Posted 14 years ago # -
I see, you can set the default value for "state" field by editing "includes/view-functions.php" file. Go to around line 1383 for this code :
foreach ($country as $data){
then put this code exactly above that line
$element->populated_value['element_'.$element->id.'_4']['default_value'] = "state";
and to remove "country" field, you can simply hide it by CSS, try to put these CSS code in your form :
#li_4_div_6 { display:none !important; }
in there I assume your address field id is 4, you need to change those ID with yours.
MachForm Support
Posted 14 years ago #
Reply
You must log in to post.