DigitalCommons / mykomap

A web application for mapping initiatives in the Solidarity Economy
3 stars 0 forks source link

[Workers.coop] Complete evaluation of MM->CiviForm change request process #234

Closed ColmDC closed 5 months ago

ColmDC commented 7 months ago

Please track against the clockify project [Workers.coop]

Description

Confirm that the CiviCRM form generated by Workers.coop works fully and the complete range of required data types can be used to prepopulate it correctly.

The form can be found here...

Acceptance Criteria

wu-lee commented 7 months ago

The form can be found here...

There isn't currently a working form, but here is a screenshot of the form as it was when last tested.

The problem this screenshot was taken to illustrate was that fields are not populating as expected. You can see the URL used in the console - I employed a hack to allow the form to work when embedded in a map hosted on localhost:8080. The URL parameters are what are significant: they're name/value pairs. For example, the parameter email is set to contact@example.com which means that the form should have that address pre-populated in the email text field. But it has not, and the console has a diagnostic from the CiviCRM form code showing the values it's picked up. And that says that email is taken from an empty url_query_param, and is not set to the value <empty string>.

Screenshot_20231004_141922

It's possible the hack itself is the problem, so this needs to be attempted again with the form hosted on a domain which CiviCRM has whitelisted for this purpose.

wu-lee commented 7 months ago

Regarding this requirement:

  • The following data types can be prepopulated with data available about the respective co-ops within a MykoMap
    • Text
    • Single choice categories
    • Lat/Long

Below, "should" means we need it for the minimal case, and "might" for the more general case. If we're only talking about the minimal working version ignore all but the "should"s.

Another value which should be possible to pre-populate, whilst still being a hidden value, is the organisation ID (AKA contact ID). We do need to know how that's specified, but it's presumably the final part of the path from the full URI we use in the map data.

If the form is to support "open data approval" a checkbox field type might need to be supported. Or at least, a "yes/no" single-select dropdown should be supported.

If the form is to perform validation before submitting, some of the fields might need more precise types. Specifically, we may need the field types for URLs, and email addresses. I think CiviCRM's form supports those... but need to check.

Reading the issue https://github.com/DigitalCommons/mykomap/issues/221, validation of the lengths of digits seems to be mandated, error messages, and a submission prompt followed by automatically closing the form window - but it's not clear if CiviCRM's form module supports these.

ColmDC commented 7 months ago

Reading the issue #221, validation of the lengths of digits seems to be mandated, error messages, and a submission prompt followed by automatically closing the form window - but it's not clear if CiviCRM's form module supports these.

Clear we shouldn't proceed with #221 until we have completed the evaluation.

ColmDC commented 5 months ago

Looks like this might be getting simplified by the client, so all the prefilling is managed by CiviCRM, and all the MM needs to do is pass the ID of the co-op whose details are being modified. See https://github.com/DigitalCommons/mykomap/issues/247

lin-d-hop commented 5 months ago

This issue is outdated, see #247