This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Modify form field description?
#1

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"?
Reply
#2

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?
Reply
#3

Thanks.

How does one change "City" to "City and State"?
Reply
#4

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?
Reply
#5

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.
Reply
#6

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)) {

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by clixcity
30-Jul-2020, 08:32 AM
Last Post by Steven
10-Jan-2017, 12:56 PM
Last Post by Steven
19-Nov-2015, 07:13 PM
Last Post by Steven
23-Apr-2013, 12:48 PM
Last Post by Steven
13-Oct-2012, 12:12 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)