gocodebox / gocodebox/lifterlms

5.0 Forms Placeholders don't work

Open
#1,705 6 comments 0 reactions 0 assignees View on GitHub
hacktoberfest help wanted Severity: Low Type: Bug
Dominant language
PHP
Stars
212
Forks
140
Avg merge
2d 14h
Merged PRs (30d)
19

Description

### Reproduction Steps

+ Open a form and set a place holder for state in either billing or registration
+ From the front end go into fill out the registration form

### Expected Behavior

+ the placeholder should override the first state in the list

### Actual Behavior

+ the first state alphabetically displays
+ For example if the country is set in LifterLMS Settings to the States, the state field defaults to Alabama instead of a placeholder of "select your state"

### Error Messages / Logs

+ Include any relevant error messages or log files
```

```

### System and Environment Information

System Report

```
Wordpress
-------------------------------------------

Home Url: https://-5-testing.myliftersite.com
Site Url: https://-5-testing.myliftersite.com
Login Url: https://-5-testing.myliftersite.com/wp-login.php
Version: 5.7.2
Debug Mode: Yes
Debug Log: Yes
Debug Display: Yes
Locale: en_US
Multisite: No
Page For Posts: Not Set
Page On Front: Homepage (#155) [https://-5-testing.myliftersite.com/]
Permalink Structure: /%postname%/
Show On Front: page
Wp Cron: Yes

Settings
-------------------------------------------

Version: 5.1.0
Db Version: 5.1.0
Course Catalog: Not Set
Membership Catalog: Membership Catalog (#10) [https://-5-testing.myliftersite.com/memberships/]
Student Dashboard: Student Dashboard (#12) [https://-5-testing.myliftersite.com/dashboard/]
Checkout Page: Purchase (#11) [https://-5-testing.myliftersite.com/purchase/]
Course Catalog Per Page: -1
Course Catalog Sorting: menu_order,ASC
Membership Catalog Per Page: 9
Membership Catalog Sorting: menu_order,ASC
Site Membership: Not Set
Courses Endpoint: my-courses
Edit Endpoint: edit-account
Lost Password Endpoint: lost-password
Vouchers Endpoint: redeem-voucher
Autogenerate Username: yes
Password Strength Meter: yes
Minimum Password Strength: strong
Terms Required: yes
Terms Page: Block Content Examples (#156) [https://-5-testing.myliftersite.com/?page_id=156]
Checkout Names: required
Checkout Address: required
Checkout Phone: optional
Checkout Email Confirmation: yes
Open Registration: yes
Registration Names: required
Registration Address: optional
Registration Phone: hidden
Registration Voucher: optional
Registration Email Confirmation: no
Account Names: required
Account Address: required
Account Phone: optional
Account Email Confirmation: yes
Confirmation Endpoint: confirm-payment
Force Ssl Checkout: no
Country: US
Currency: USD
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Decimals: 2
Trim Zero Decimals: no
Recurring Payments: yes
Email From Address: team+sandbox@lifterlms.com
Email From Name: A LifterLMS Sandbox
Email Footer Text:
Email Header Image:
Cert Bg Width: 800
Cert Bg Height: 616
Cert Legacy Compat: no

Constants
-------------------------------------------

LLMS_REMOVE_ALL_DATA: undefined
LLMS_REST_DISABLE: undefined
LLMS_SITE_FEATURE_RECURRING_PAYMENTS: undefined
LLMS_SITE_IS_CLONE: undefined

Gateways
-------------------------------------------

Manual: Enabled
Manual Logging: no
Manual Order: 1

Server
-------------------------------------------

Mysql Version: 5.7.34
Php Curl: Yes
Php Default Timezone: UTC
Php Fsockopen: Yes
Php Max Input Vars: 5000
Php Max Upload Size: 512 MB
Php Memory Limit: 256M
Php Post Max Size: 1024M
Php Soap: Yes
Php Suhosin: No
Php Time Limt: 30
Php Version: 7.3.29
Software: Apache/2.4.48 (Unix) OpenSSL/1.1.1
Wp Memory Limit: 256M

Browser
-------------------------------------------

HTTP USER AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36

Theme
-------------------------------------------

Name: Astra
Version: 3.6.4
Themeuri: https://wpastra.com/
Authoruri: https://wpastra.com/about/
Template:
Child Theme: No
Llms Support: Yes

Plugins
-------------------------------------------

BuddyPress: 8.0.0
LifterLMS: 5.1.0
LifterLMS Custom Fields: 2.0.0
LifterLMS PDFs: 1.0.0

Integrations
-------------------------------------------

BbPress: No
BuddyPress: Yes

Template Overrides
-------------------------------------------

```

This issue has be recreated:
+ [x] Locally
+ [X] On a staging site
+ [X] On a production website
+ [X] With only LifterLMS and a default theme

### Browser, Device, and Operating System Information

+ Browser name and version
+ Operating System name and version
+ Device name and version (if applicable)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in the billing and registration forms, then trace the form handling for the state field and its placeholder. Done means a configured placeholder such as "select your state" is shown instead of the first alphabetical state, including when the country is set to States.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.