Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a function for filling text fields #3

Open
pbchase opened this issue Jan 2, 2025 · 0 comments
Open

Add a function for filling text fields #3

pbchase opened this issue Jan 2, 2025 · 0 comments
Assignees

Comments

@pbchase
Copy link
Contributor

pbchase commented Jan 2, 2025

Add a function for filling text fields. Name the function something like get_long_text_field_values.R. We will be calling it to handle text fields at

all_responses <- dplyr::bind_rows(
It will, in turn, call functions to handle different text validation types.

In this first iteration, it should test if text_validation_type is NA.

If TRUE this function should call a function named get_long_text_field_no_validation_values. get_long_text_field_no_validation_values should return samples of lorem ipsum text for each such field. e.g.

# install.packages("lorem")
replicate(5, lorem::ipsum_words(sample(3, size = 1)))

If FALSE, (i.e., there is a text validation rule), call get_long_text_field_unimplemented_validation_values.R. That function would return an NA for each such field.

@pbchase pbchase added this to the Handle all field_types milestone Jan 2, 2025
pbchase added a commit to pbchase/redcapfiller that referenced this issue Jan 15, 2025
Address issues ctsit#3, ctsit#7.
Add get_long_text_fields().
Add get_long_text_field_values().
Modify get_long_categorical_field_response_values().
Modify get_one_rectangle_of_values()
Update proof_of_concept().
Update README to reflect the new feature.
@pbchase pbchase self-assigned this Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant