Skip Navigation

[Gelöst] How to use module manager to populate a custom select user field with states

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem: I would like to create a custom select field populated with all the states as options.

Solution: This process is complex, and requires some custom code and knowledge of XML formatting.
- Create your custom select field and include one or two options manually.
- Export Types data using Toolset > Export / Import. Inspect the generated XML file and observe the format needed for the state options you created manually.
- Expand the module created by another user that includes all the states. From the XML file, copy all the states nodes and transform them into the format required by the custom field XML document.
- Reimport the Types data with the updated states options
- Regenerate the CRED form to include the appropriate select options.

Relevant Documentation:
https://toolset.com/forums/topic/how-to-import-states-and-countries-into-selects-for-fields/#post-244714

This support ticket is created vor 7 Jahren, 2 Monaten. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Dieses Thema enthält 6 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von michaelS-13 vor 7 Jahren, 2 Monaten.

Assistiert von: Christian Cox.

Author
Artikel
#568637

Tell us what you are trying to do?

In a "Resolved" Support thread Luo Yang on March 18, 2014 suggests a workaround to getting a custom user select field to populate with the 50 states by importing an XML file with the Module Manager.

Is there any documentation that you are following?

Far as I can tell, this isn't something that is covered in the docs or previous threads.

Is there a similar example that we can see?

What is the link to your site?
versteckter Link

#568662

Hi, here's how I would approach this generally:
- Create a new User Field, of type "select", and create one or two options manually.
- Export this new User Field and its options using Toolset Import / Export.
- Open the generated XML file to see how User Fields are set up in XML.
- Download the module that another user created which includes all the states: https://toolset.com/forums/topic/how-to-import-states-and-countries-into-selects-for-fields/#post-244714
- Expand that archive and look for the XML file containing the module information
- Copy the XML used to define the states fields, then transform it into the format required in your previously exported user fields XML file. Import the file in your site to override existing User field options.

This is a pretty advanced process so it's probably best to take this a step at a time. Let me know how far you are able to get, then if you get stuck I can offer some more advice.

#568811

A step at a time:
- Created new User Field of type "select, and created two options manually.
- Toolset Export/Import has no export function for a User Field, only "Export All User Forms", which I did.
- Transformed XML states fields into the format required by the previously exported User Forms XML Export.
- Imported resulting XML User Form with the "select" field modification, selecting "Overwrite existing user forms" only the first try, then both "Overwrite existing user forms" and "Import and Overwrite CRED Settings" in the second Import attempt.
- In both cases, the message was returned "The XML file (filename.xml) could not be read.
Here's a copy of the User Form XML file as imported.


<?xml version="1.0" encoding="UTF-8"?>
-<forms>
-<form>
	<ID>27165</ID>
	<post_content><div> <p>To list your puppy, first set up a <span Style="color:red"><em>FREE</em></span> Seller Account by completing the Registration Form below. You will receive email notification that your Seller Account has been created within 24 hours.</p> <p>Enter the contact information that will be displayed with your Puppy Listing.</p> <hr> </div> [creduserform class='cred-user-form cred-keep-original'] [cred_field field='form_messages' value='' class='alert alert-warning'] <div class="form-group"> <label>Kennel or Contact Name:</label> [cred_field field='nickname' post='user' value='' urlparam='' class='form-control' output='bootstrap'] </div> <div class="form-group"> <label>Email:</label> [cred_field field='user_email' post='user' value='' urlparam='' class='form-control' output='bootstrap'] </div> <div class="form-group"> <label>Phone Number:</label> [cred_field field='telephone' post='user' value='' urlparam='' class='form-control' output='bootstrap'] </div> <div class="form-group"> <label>Website:<span style="color:red"> Optional</span></label> [cred_field field='telephone' post='user' value='' urlparam='' class='form-control' output='bootstrap'] </div> <div class="form-group">[cred_field field='recaptcha' value='' urlparam='' class='form-control' output='bootstrap']</div> [cred_field field='form_submit' value='Submit' urlparam='' class='btn btn-primary btn-lg' output='bootstrap'] [/creduserform] </post_content>
	<post_title>Puppy Seller Registration</post_title>
	<post_name>create-user-puppy-seller-1</post_name>
	<post_type>cred-user-form</post_type>
-<meta>
	-<extra>
		<css/>
		<js/>
		-<messages>
			<cred_message_add_new_taxonomy>Add New</cred_message_add_new_taxonomy>
			<cred_message_add_taxonomy>Add</cred_message_add_taxonomy>
			<cred_message_edit_skype_button>Edit Skype Button</cred_message_edit_skype_button>
			<cred_message_email_already_exists>Sorry, that email address is already used!</cred_message_email_already_exists>
			<cred_message_enter_valid_captcha>Wrong CAPTCHA</cred_message_enter_valid_captcha>
			<cred_message_enter_valid_colorpicker>Please use a valid hexadecimal value</cred_message_enter_valid_colorpicker>
			<cred_message_enter_valid_date>Please enter a valid date</cred_message_enter_valid_date>
			<cred_message_enter_valid_email>Please enter a valid email address</cred_message_enter_valid_email>
			<cred_message_enter_valid_number>Please enter numeric data</cred_message_enter_valid_number>
			<cred_message_enter_valid_url>Please enter a valid URL address</cred_message_enter_valid_url>
			<cred_message_field_required>This field is required</cred_message_field_required>
			<cred_message_file_type_not_allowed>File type not allowed</cred_message_file_type_not_allowed>
			<cred_message_hide_popular>Hide Popular</cred_message_hide_popular>
			<cred_message_image_height_larger>Image height larger than %dpx</cred_message_image_height_larger>
			<cred_message_image_width_larger>Image width larger than %dpx</cred_message_image_width_larger>
			<cred_message_invalid_edit_user_role>You can only edit users with following roles</cred_message_invalid_edit_user_role>
			<cred_message_invalid_form_submission>Invalid User Form Submission (nonce failure)</cred_message_invalid_form_submission>
			<cred_message_missing_captcha>Missing CAPTCHA</cred_message_missing_captcha>
			<cred_message_no_data_submitted>Invalid User Form Submission (maybe a file has a size greater than allowed)</cred_message_no_data_submitted>
			<cred_message_not_valid_image>Not Valid Image</cred_message_not_valid_image>
			<cred_message_passwords_do_not_match>Passwords do not match</cred_message_passwords_do_not_match>
			<cred_message_post_not_saved_plural>The user was not saved because of the following %NN problems:</cred_message_post_not_saved_plural>
			<cred_message_post_not_saved_singular>The user was not saved because of the following problem:</cred_message_post_not_saved_singular>
			<cred_message_post_saved>User Saved</cred_message_post_saved>
			<cred_message_remove_taxonomy>Remove</cred_message_remove_taxonomy>
			<cred_message_show_captcha>Show CAPTCHA</cred_message_show_captcha>
			<cred_message_show_popular>Show Popular</cred_message_show_popular>
			<cred_message_upload_failed>Upload Failed</cred_message_upload_failed>
			<cred_message_username_already_exists>Sorry, that username already exists!</cred_message_username_already_exists>
			<cred_message_values_do_not_match>Field values do not match</cred_message_values_do_not_match>
		</messages>
	</extra>
	-<form_settings>
		-<form>
			<action>form</action>
			<action_message/>
			<action_page/>
			<action_user/>
			<autogenerate_nickname_scaffold>1</autogenerate_nickname_scaffold>
			<autogenerate_password_scaffold>1</autogenerate_password_scaffold>
			<autogenerate_username_scaffold>1</autogenerate_username_scaffold>
			<has_media_button>0</has_media_button>
			<hide_comments>0</hide_comments>
			<include_captcha_scaffold>1</include_captcha_scaffold>
			<include_wpml_scaffold>0</include_wpml_scaffold>
			<redirect_delay>0</redirect_delay>
			<theme>minimal</theme>
			<type>new</type>
			<use_ajax>1</use_ajax>
			<user_role>["ftm_puppy_seller"]</user_role>
			</form>
			-<post>
				<post_status/>
				<post_type/>
			</post>
		</form_settings>
		-<notification>
			<enable>1</enable>
		</notification>
		<wizard>-1</wizard>
	</meta>
</form>
-<settings>
	<wizard>1</wizard>
	<cache_notice>1</cache_notice>
	<export_settings>1</export_settings>
	<export_custom_fields>1</export_custom_fields>
	-<recaptcha>
		<public_key>6Lfo7S8UAAAAAP8VfTBAqkYzSjIGjXlUjUnJUYlf</public_key>
		<private_key>6Lfo7S8UAAAAADURE6rffjQCDbF2G5BY1rFXRjbL</private_key>
	</recaptcha>
	-<autogeneration_email>
		<subject>Welcome new user</subject>
		<body>[username]Your username is: %cuf_username%[/username]\n[nickname]Your nickname is: %cuf_nickname%[/nickname]\n[password]Your password is: %cuf_password%[/password]</body>
	</autogeneration_email>
	<dont_load_cred_css>1</dont_load_cred_css>
	<enable_post_expiration>0</enable_post_expiration>
</settings>
-<custom_fields>
	-<telephone>
		<id>telephone</id>
		<slug>telephone</slug>
		<type>phone</type>
		<name>Telephone</name>
		<description/>
		-<data>
			<slug-pre-save>telephone</slug-pre-save>
			<placeholder/>
			<user_default_value/>
			<repetitive>0</repetitive>
			-<validate>
				-<required>
					<active>1</active>
					<value>true</value>
					<message>This field is required.</message>
				</required>
			</validate>
			<custom_use/>
			<disabled_by_type>0</disabled_by_type>
		</data>
		<meta_key>wpcf-telephone</meta_key>
		<meta_type>usermeta</meta_type>
		<post_labels>telephone</post_labels>
		<post_type>user</post_type>
		<plugin_type>types</plugin_type>
		<plugin_type_prefix>wpcf-</plugin_type_prefix>
	</telephone>
	-<website>
		<id>website</id>
		<slug>website</slug>
		<type>url</type>
		<name>Website</name>
		<description>Website</description>
		-<data>
			<slug-pre-save>website</slug-pre-save>
			<placeholder/>
			<user_default_value/>
			<repetitive>0</repetitive>
			-<validate>
				-<url>
					<active>1</active>
					<message>Please enter a valid URL address.</message>
				</url>
			</validate>
			<custom_use/>
			<disabled_by_type>0</disabled_by_type>
		</data>
		<meta_key>wpcf-website</meta_key>
		<meta_type>usermeta</meta_type>
		<post_labels>website</post_labels>
		<post_type>user</post_type>
		<plugin_type>types</plugin_type>
		<plugin_type_prefix>wpcf-</plugin_type_prefix>
	</website>
	-<state>
	<id>state</id>
	<slug>state</slug>
	<type>select</type>
	<name>State</name>
	<description/>
	-<data>
		<slug-pre-save>state</slug-pre-save>
		-<options>
			<wpcf-fields-select-option-c2fb9d4ac7485543264a48e6aed389cc-1>
				<title>Alaska</title>
				<value>1</value>
			</wpcf-fields-select-option-c2fb9d4ac7485543264a48e6aed389cc-1>
			-<wpcf-fields-select-option-2e7339e2d8ca282a2cae05033108c44c-1>
				<title>Arizona</title>
				<value>2</value>
			</wpcf-fields-select-option-2e7339e2d8ca282a2cae05033108c44c-1>
			-<wpcf-fields-select-option-312bc1168e85cd7d07eb42f0ef5b64b8-1>
				<title>Arkansas</title>
				<value>3</value>
			</wpcf-fields-select-option-312bc1168e85cd7d07eb42f0ef5b64b8-1>
			-<wpcf-fields-select-option-05509b131eec413956d73ac11688b846-1>
				<title>California</title>
				<value>4</value>
			</wpcf-fields-select-option-05509b131eec413956d73ac11688b846-1>
			-<wpcf-fields-select-option-4ac840d04cfb2b97af63c8385f527ae7-1>
				<title>Colorado</title>
				<value>5</value>
			</wpcf-fields-select-option-4ac840d04cfb2b97af63c8385f527ae7-1>
			-<wpcf-fields-select-option-55e9a7e81075468d0e1f74d8eef8834c-1>
				<title>Connecticut</title>
				<value>6</value>
			</wpcf-fields-select-option-55e9a7e81075468d0e1f74d8eef8834c-1>
			-<wpcf-fields-select-option-fe8516149b35a621f589df0f6908716c-1>
				<title>Delaware</title>
				<value>7</value>
			</wpcf-fields-select-option-fe8516149b35a621f589df0f6908716c-1>
			-<wpcf-fields-select-option-b149f4c686b96a9c76791cee629389f9-1>
				<title>Florida</title>
				<value>8</value>
			</wpcf-fields-select-option-b149f4c686b96a9c76791cee629389f9-1>
			-<wpcf-fields-select-option-99e69aecf9eb6fa22718f39f7c993043-1>
				<title>Georgia</title>
				<value>9</value>
			</wpcf-fields-select-option-99e69aecf9eb6fa22718f39f7c993043-1>
			-<wpcf-fields-select-option-a2f0ddba93e140ec0a651958cd1a21b5-1>
				<title>Hawaii</title>
				<value>10</value>
			</wpcf-fields-select-option-a2f0ddba93e140ec0a651958cd1a21b5-1>
			-<wpcf-fields-select-option-2609d108ca2c5e9ef709ca1fe6a8294b-1>
				<title>Idaho</title>
				<value>11</value>
			</wpcf-fields-select-option-2609d108ca2c5e9ef709ca1fe6a8294b-1>
			-<wpcf-fields-select-option-b3367b11d0bf9c74594bfbc637e170f9-1>
				<title>Illinois</title>
				<value>12</value>
			</wpcf-fields-select-option-b3367b11d0bf9c74594bfbc637e170f9-1>
			-<wpcf-fields-select-option-f27ea251b5d6d181b80645350727df48-1>
				<title>Indiana</title>
				<value>13</value>
			</wpcf-fields-select-option-f27ea251b5d6d181b80645350727df48-1>
			-<wpcf-fields-select-option-79fa857d0bf322ce0f89f871c3fb2618-1>
				<title>Iowa</title>
				<value>14</value>
			</wpcf-fields-select-option-79fa857d0bf322ce0f89f871c3fb2618-1>
			-<wpcf-fields-select-option-0507000b26b9ae13a18175fb1584c618-1>
				<title>Kansas</title>
				<value>15</value>
			</wpcf-fields-select-option-0507000b26b9ae13a18175fb1584c618-1>
			-<wpcf-fields-select-option-a8879258a0d1d813915e4032a480e869-1>
				<title>Kentucky</title>
				<value>16</value>
			</wpcf-fields-select-option-a8879258a0d1d813915e4032a480e869-1>
			-<wpcf-fields-select-option-de099e5ca118f25ce172e48af147a6f8-1>
				<title>Louisiana</title>
				<value>17</value>
			</wpcf-fields-select-option-de099e5ca118f25ce172e48af147a6f8-1>
			-<wpcf-fields-select-option-b96f485d7540f42d5ba0b51bb69c4dd4-1>
				<title>Maine</title>
				<value>18</value>
			</wpcf-fields-select-option-b96f485d7540f42d5ba0b51bb69c4dd4-1>
			-<wpcf-fields-select-option-a6f9243331008486727943340c6563d7-1>
				<title>Maryland</title>
				<value>19</value>
			</wpcf-fields-select-option-a6f9243331008486727943340c6563d7-1>
			-<wpcf-fields-select-option-6732b1627d887cbcc99a2c6304015f00-1>
				<title>Massachusetts</title>
				<value>20</value>
			</wpcf-fields-select-option-6732b1627d887cbcc99a2c6304015f00-1>
			-<wpcf-fields-select-option-e77af9b505d0c0f4a239c4d376d7cc15-1>
				<title>Michigan</title>
				<value>21</value>
			</wpcf-fields-select-option-e77af9b505d0c0f4a239c4d376d7cc15-1>
			-<wpcf-fields-select-option-437cc11c7a833595cdeb681b397c65b5-1>
				<title>Minnesota</title>
				<value>22</value>
			</wpcf-fields-select-option-437cc11c7a833595cdeb681b397c65b5-1>
			-<wpcf-fields-select-option-ba49d414af167810a5e93deda1be3770-1>
				<title>Mississippi</title>
				<value>23</value>
			</wpcf-fields-select-option-ba49d414af167810a5e93deda1be3770-1>
			-<wpcf-fields-select-option-565a8486721d2ca7300b5ad348c80f3d-1>
				<title>Missouri</title>
				<value>24</value>
			</wpcf-fields-select-option-565a8486721d2ca7300b5ad348c80f3d-1>
			-<wpcf-fields-select-option-3e538f74fff55877757ae9fb65a61f92-1>
				<title>Montana</title>
				<value>25</value>
			</wpcf-fields-select-option-3e538f74fff55877757ae9fb65a61f92-1>
			-<wpcf-fields-select-option-f09303bd6704fcb74fac0696e4cc210c-1>
				<title>Nebraska</title>
				<value>26</value>
			</wpcf-fields-select-option-f09303bd6704fcb74fac0696e4cc210c-1>
			-<wpcf-fields-select-option-a8260c6568a960afde5a48511a364602-1>
				<title>Nevada</title>
				<value>27</value>
			</wpcf-fields-select-option-a8260c6568a960afde5a48511a364602-1>
			-<wpcf-fields-select-option-5c68657be85fcb9726a230d10aad7dd0-1>
				<title>New Hampshire</title>
				<value>28</value>
			</wpcf-fields-select-option-5c68657be85fcb9726a230d10aad7dd0-1>
			-<wpcf-fields-select-option-93b214bc397938ffe00ff5461b929bf2-1>
				<title>New Jersey</title>
				<value>29</value>
			</wpcf-fields-select-option-93b214bc397938ffe00ff5461b929bf2-1>
			-<wpcf-fields-select-option-61df1f76be2dce33578b8342c15097a5-1>
				<title>New Mexico</title>
				<value>30</value>
			</wpcf-fields-select-option-61df1f76be2dce33578b8342c15097a5-1>
			-<wpcf-fields-select-option-e894b851e5ce92b4cba593aa9f613289-1>
				<title>New York</title>
				<value>31</value>
			</wpcf-fields-select-option-e894b851e5ce92b4cba593aa9f613289-1>
			-<wpcf-fields-select-option-97b5d3ae3284a08fa4a081b64f0a91e8-1>
				<title>North Carolina</title>
				<value>32</value>
			</wpcf-fields-select-option-97b5d3ae3284a08fa4a081b64f0a91e8-1>
			-<wpcf-fields-select-option-5f8d319c21a2f88c25c1c2b779a5c2dc-1>
				<title>North Dakota</title>
				<value>33</value>
			</wpcf-fields-select-option-5f8d319c21a2f88c25c1c2b779a5c2dc-1>
			-<wpcf-fields-select-option-cfdef26ece46a84387020f77586211d0-1>
				<title>Ohio</title>
				<value>34</value>
			</wpcf-fields-select-option-cfdef26ece46a84387020f77586211d0-1>
			-<wpcf-fields-select-option-ad2140e78677e9cf9b39ae59bf2492e1-1>
				<title>Oklahoma</title>
				<value>35</value>
			</wpcf-fields-select-option-ad2140e78677e9cf9b39ae59bf2492e1-1>
			-<wpcf-fields-select-option-02f6214136239f22435684c897b1591c-1>
				<title>Oregon</title>
				<value>36</value>
			</wpcf-fields-select-option-02f6214136239f22435684c897b1591c-1>
			-<wpcf-fields-select-option-13570b3227eee0c00448bc32ba5f03a1-1>
				<title>Pennsylvania</title>
				<value>37</value>
			</wpcf-fields-select-option-13570b3227eee0c00448bc32ba5f03a1-1>
			-<wpcf-fields-select-option-cc7bacd191ccd8333ea85c4c4a81a6d0-1>
				<title>Rhode Island</title>
				<value>38</value>
			</wpcf-fields-select-option-cc7bacd191ccd8333ea85c4c4a81a6d0-1>
			-<wpcf-fields-select-option-f6d56848026dfc3a1f410f0d6109e6f4-1>
				<title>South Carolina</title>
				<value>39</value>
			</wpcf-fields-select-option-f6d56848026dfc3a1f410f0d6109e6f4-1>
			-<wpcf-fields-select-option-a074158036aad1ef189c81520f57947f-1>
				<title>South Dakota</title>
				<value>40</value>
			</wpcf-fields-select-option-a074158036aad1ef189c81520f57947f-1>
			-<wpcf-fields-select-option-979a553cc1672c252b9c40b06a5933e1-1>
				<title>Tennessee</title>
				<value>41</value>
			</wpcf-fields-select-option-979a553cc1672c252b9c40b06a5933e1-1>
			-<wpcf-fields-select-option-73d997f128d6d6699db56900697d765e-1>
				<title>Texas</title>
				<value>42</value>
			</wpcf-fields-select-option-73d997f128d6d6699db56900697d765e-1>
			-<wpcf-fields-select-option-68f79cf79e67a6aa447c561511775c72-1>
				<title>Utah</title>
				<value>43</value>
			</wpcf-fields-select-option-68f79cf79e67a6aa447c561511775c72-1>
			-<wpcf-fields-select-option-ec55cc4cef7903fdd932861ef93787f1-1>
				<title>Vermont</title>
				<value>44</value>
			</wpcf-fields-select-option-ec55cc4cef7903fdd932861ef93787f1-1>
			-<wpcf-fields-select-option-5236fa25267b1b50e296d5905a72ffa2-1>
				<title>Virgin Islands</title>
				<value>45</value>
			</wpcf-fields-select-option-5236fa25267b1b50e296d5905a72ffa2-1>
			-<wpcf-fields-select-option-d85954d8fd375ce3df9c735436afdc5c-1>
				<title>Virginia</title>
				<value>46</value>
			</wpcf-fields-select-option-d85954d8fd375ce3df9c735436afdc5c-1>
			-<wpcf-fields-select-option-ed5f4c58628616a257c1d60147fe5763-1>
				<title>Washington</title>
				<value>47</value>
			</wpcf-fields-select-option-ed5f4c58628616a257c1d60147fe5763-1>
			-<wpcf-fields-select-option-4d1355b5d399e2dd3b799ea10c7f50b5-1>
				<title>West Virginia</title>
				<value>48</value>
			</wpcf-fields-select-option-4d1355b5d399e2dd3b799ea10c7f50b5-1>
			-<wpcf-fields-select-option-3f1f6b73568133dafca8aa434bf5e9ef-1>
				<title>Wisconsin</title>
				<value>49</value>
			</wpcf-fields-select-option-3f1f6b73568133dafca8aa434bf5e9ef-1>
			-<wpcf-fields-select-option-c5d07e0e81ebc1332927c4d5d369adb6-1>
				<title>Wyoming</title>
				<value>50</value>
			</wpcf-fields-select-option-c5d07e0e81ebc1332927c4d5d369adb6-1>
			<default>no-default</default>
		</options>
		-<validate>
			-<required>
				<active>1</active>
				<value>true</value>
				<message>This field is required.</message>
			</required>
		</validate>
		<custom_use/>
		<disabled_by_type>0</disabled_by_type>
	</data>
	<meta_key>wpcf-state</meta_key>
	<meta_type>usermeta</meta_type>
	<post_labels>state</post_labels>
	<post_type>user</post_type>
	<plugin_type>types</plugin_type>
	<plugin_type_prefix>wpcf-</plugin_type_prefix>
</state>
-<description>
	<id>description</id>
	<slug>description</slug>
	<type>wysiwyg</type>
	<name>Biographical Info</name>
	<data/>
	<meta_key>description</meta_key>
	<post_type>user</post_type>
	<meta_type>usermeta</meta_type>
	<post_labels>Biographical Info</post_labels>
	<plugin_type/>
	<plugin_type_prefix/>
</description>
-<first_name>
	<id>first_name</id>
	<slug>first_name</slug>
	<type>textfield</type>
	<name>First Name</name>
	<data/>
	<meta_key>first_name</meta_key>
	<post_type>user</post_type>
	<meta_type>usermeta</meta_type>
	<post_labels>First Name</post_labels>
	<plugin_type/>
	<plugin_type_prefix/>
</first_name>
-<last_name>
	<id>last_name</id>
	<slug>last_name</slug>
	<type>textfield</type>
	<name>Last Name</name>
	<data/>
	<meta_key>last_name</meta_key>
	<post_type>user</post_type>
	<meta_type>usermeta</meta_type>
	<post_labels>Last Name</post_labels>
	<plugin_type/>
	<plugin_type_prefix/>
</last_name>
</custom_fields>
</forms>

#568825

Toolset Export/Import has no export function for a User Field, only "Export All User Forms", which I did.
You need to export all Types information by going to Toolset -> Export / Import and select the Types tab. Export Types data from here.

In both cases, the message was returned "The XML file (filename.xml) could not be read.
Before importing the XML file, try to validate your XML syntax using an online validation tool like W3's Validator:
versteckter Link
You can copy + paste the entire file contents into the "Validate by direct input" tab.

#568931

User Form exported XML was cleaned up and validated (not sure why export would be setup to export malformed XML, such as inserting a dash in front of every HTML tag.

Validated file imported. The result was to wipe out the entire CRED User Form.

Not sure why exporting the Post Types is relevant, but did so, giving me a 1kb settings.php file and a 4kb settings.xml file.

Not sure what I'm supposed to do with these files as it related to the original problem with the CRED User Form "select" field.

#569004

The PHP file can be disregarded. The XML file will contain quite a lot of information, most of it irrelevant to the task at hand. However, this is the only way to get the information you need about all the states exported into a usable format. Now you should find the states XML nodes in this document, which you can then translate into the format required by the original Types export file.

You will then re-import the updated original Types export file to include the states fields. Then when you generate a CRED form, it will recognize these fields and add them automatically. Make sense?

#571795

Thanks.

Das Forum „Types Community Support“ ist für neue Themen und Antworten geschlossen.