Posts: 4
Threads: 3
Joined: Oct 2014
The default form fields include "City" but not "State".
Can the descriptor for "City" be changed to "City and State"?
Or can another form field be added for "State"?
Or can form field "Country" be changed to "State"?
Posts: 2,894
Threads: 59
Joined: Jun 2010
Adding a new form field is complicated at the moment. If your visitors are from the same country then it would be best to change the country field to state. If they're from different countries then change the city to city and state. But note that the validation for city only allows letters, ampersand, hyphen, apostrophe, period and space. A comma is invalid because it's the character which separates the city and the country inside each comment so it'd be too ambiguous. You can of course change the validation.
Have
you completed
the interview?
Posts: 4
Threads: 3
Joined: Oct 2014
Thanks.
How does one change "City" to "City and State"?
Posts: 2,894
Threads: 59
Joined: Jun 2010
Presumably you have changed it from "Town" to "City" already? If so then repeat that process but modify it to say "City & State".
This FAQ will help with locating where to change things:
https://www.commentics.org/support/knowl...?article=9
Have
you completed
the interview?
Posts: 1
Threads: 0
Joined: May 2016
I want to change Town as well and remove the restriction for numeric characters, I don't need country and see where I can disable that in the admin panel, but would like to use Town for another purpose, I can change the title in the code to say Product or Username, as I want to use the commentics as a generic rating system on my site to rate products for 1 and then a second site to rate users, so a username might be hellokitty123, I tried to enter that into Town on the demo and it says no numerical characters, is that an easy change I can make. I don't mind the products being in parentheses as that will highlight the rated username or product.
Posts: 2,894
Threads: 59
Joined: Jun 2010
To allow numbers in the town field you'd need to open the file /upload/includes/functions/processor.php and make the following change.
Find this:
PHP Code:
<?php
if (!preg_match('/^[\p{L}&\-\'. ]+$/u', $town)) {
Change to:
PHP Code:
<?php
if (!preg_match('/^[\p{L}&\-\'. 0-9]+$/u', $town)) {