The e+e-→K+K- cross section and charged-kaon electromagnetic form factor are measured in the e+e- center-of-mass energy range (E) from 2.6 to 8.0 GeV using the initial-state radiation technique with an undetected photon. The study is performed using 469fb-1 of data collected with the BABAR detector at the PEP-II2 e+e- collider at center-of-mass energies near 10.6 GeV. The form factor is found to decrease with energy faster than 1/E2 and approaches the asymptotic QCD prediction. Production of the K+K- final state through the J/ψ and ψ(2S) intermediate states is observed. The results for the kaon form factor are used together with data from other experiments to perform a model-independent determination of the relative phases between electromagnetic (single-photon) and strong amplitudes in J/ψ and ψ(2S)→K+K- decays. The values of the branching fractions measured in the reaction e+e-→K+K- are shifted relative to their true values due to interference between resonant and nonresonant amplitudes. The values of these shifts are determined to be about ±5% for the J/ψ meson and ±15% for the ψ(2S) meson.